A11Y: SelectOptionGroup component fix lint rule about element interactions (#72213)

* A11Y: SelectOptionGroup component fix lint rule about element interactions

* Undone changes following feedback received
This commit is contained in:
RoxanaAnamariaTurc 2023-07-26 10:23:01 +01:00 committed by GitHub
parent ce5609e8ee
commit 4990f36d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,11 +81,11 @@ class UnthemedSelectOptionGroup extends PureComponent<ExtendedGroupProps, State>
return (
<div>
{/* TODO: fix keyboard a11y */}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
<div className={styles.header} onClick={this.onToggleChildren}>
{/*React Select doesn't support focusable option group headers, this will be skipped when using
the keyboard */}
<div className={styles.header} onClick={this.onToggleChildren} role="presentation">
<span className={styles.label}>{label}</span>
<Icon className={styles.icon} name={expanded ? 'angle-up' : 'angle-down'} />{' '}
<Icon className={styles.icon} name={expanded ? 'angle-up' : 'angle-down'} />
</div>
{expanded && children}
</div>