Skip to content

Added aria-autocomplete prop to select input#4992

Open
abhijeetranmale7 wants to merge 9 commits intoJedWatson:masterfrom
abhijeetranmale7:added_aria-autocomplete_prop
Open

Added aria-autocomplete prop to select input#4992
abhijeetranmale7 wants to merge 9 commits intoJedWatson:masterfrom
abhijeetranmale7:added_aria-autocomplete_prop

Conversation

@abhijeetranmale7
Copy link
Copy Markdown

How it was:

There is no prop available for react select to change aria-autocomplete attribute like we can change aria-label.
The value for aria-autocomplete is set to "list" and is unable to change through props.
Refer the following url to the line of code.
https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/Select.tsx#L1560
Because of aria-autocomplete="list", the screen reader reads out things that the user shouldn't really need to hear. something like "edit text autocompletion lists" is read out.
to prevent that we need to set aria-autocomplete to none. But since it has constant value "list", we are not able to do so.

What I did:

I have added aria-autocomplete prop to the select input with default value as 'list'

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 13, 2022

⚠️ No Changeset found

Latest commit: fbcd74e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Jan 13, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit fbcd74e:

Sandbox Source
react-codesandboxer-example Configuration

@cshahdev
Copy link
Copy Markdown

Can we review and approve this please? It's somewhat required for us. Thank you.
@Rall3n @Methuselah96

Comment thread packages/react-select/src/Select.tsx Outdated
/** Aria label (for assistive tech) */
'aria-label'?: AriaAttributes['aria-label'];
/** Aria autocomplete */
'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kethomas, Thanks for the review. I've removed the "inline" option. Please check.

@cshahdev
Copy link
Copy Markdown

Hey @Methuselah96,

Can we approve these changes and merge this PR?
It's somewhat required.

Thank you.

@halain
Copy link
Copy Markdown

halain commented Jan 3, 2023

I would like to know why a year later this PR is still open and it did not merge, it is something very important for a11y

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants