Skip to content

Commit

Permalink
[a11y cleanup] Remove labelledBy ID
Browse files Browse the repository at this point in the history
- as far as I can tell it's not doing anything meaningful on the popover, and the content was previously not predictable or useful

- native `select`s do not have an association with the select label and the dropdown, so I don't think this component needs to either
  • Loading branch information
cee-chen committed Mar 2, 2023
1 parent 599a47c commit 2336109
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/components/form/super_select/super_select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export class EuiSuperSelect<T extends string> extends Component<
private _isMounted: boolean = false;

describedById = htmlIdGenerator('euiSuperSelect_')('_screenreaderDescribeId');
labelledById = htmlIdGenerator('euiSuperSelect_')('_screenreaderLabelId');

state = {
isPopoverOpen: this.props.isOpen || false,
Expand Down Expand Up @@ -293,7 +292,6 @@ export class EuiSuperSelect<T extends string> extends Component<

const button = (
<EuiSuperSelectControl
screenReaderId={this.labelledById}
options={options}
value={valueOfSelected}
placeholder={placeholder}
Expand Down Expand Up @@ -351,7 +349,6 @@ export class EuiSuperSelect<T extends string> extends Component<
</p>
</EuiScreenReaderOnly>
<div
aria-labelledby={this.labelledById}
aria-describedby={this.describedById}
className="euiSuperSelect__listbox"
role="listbox"
Expand Down
6 changes: 0 additions & 6 deletions src/components/form/super_select/super_select_control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ export interface EuiSuperSelectControlProps<T>
* `string` | `ReactElement` or an array of these
*/
append?: EuiFormControlLayoutProps['append'];
/**
* Creates a semantic label ID for the `div[role="listbox"]` that's opened on click or keypress.
* __Generated and passed down by `EuiSuperSelect`.__
*/
screenReaderId?: string;
}

export const EuiSuperSelectControl: <T extends string>(
Expand All @@ -97,7 +92,6 @@ export const EuiSuperSelectControl: <T extends string>(
placeholder,
prepend,
append,
screenReaderId,
disabled,
...rest
} = props;
Expand Down

0 comments on commit 2336109

Please sign in to comment.