Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(List): improve a11y #960

Merged
merged 12 commits into from
Sep 12, 2023
Merged

feat(List): improve a11y #960

merged 12 commits into from
Sep 12, 2023

Conversation

zamkovskaya
Copy link
Contributor

@zamkovskaya zamkovskaya commented Aug 28, 2023

Closes #686

@zamkovskaya zamkovskaya requested a review from korvin89 as a code owner August 28, 2023 08:30
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@zamkovskaya zamkovskaya linked an issue Aug 28, 2023 that may be closed by this pull request
src/components/List/components/ListItem.tsx Outdated Show resolved Hide resolved
src/components/List/List.tsx Outdated Show resolved Hide resolved
src/components/List/components/ListItem.tsx Outdated Show resolved Hide resolved
src/components/List/List.tsx Outdated Show resolved Hide resolved
src/components/List/components/SimpleContainer.tsx Outdated Show resolved Hide resolved
@korvin89 korvin89 self-assigned this Sep 4, 2023
Copy link
Contributor

@korvin89 korvin89 left a comment

Choose a reason for hiding this comment

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

Do we actually need this logic if we use List selection api?

src/components/List/README.md Show resolved Hide resolved
src/components/List/List.tsx Show resolved Hide resolved
src/components/Select/Select.tsx Show resolved Hide resolved
src/components/Select/Select.tsx Show resolved Hide resolved
src/components/utils/useSelect/useSelect.ts Show resolved Hide resolved
@zamkovskaya
Copy link
Contributor Author

In the List component, any type of selection (single or multiple) is represented with orange highlighting. In the Select component, single selection is also displayed as orange highlighting, while multiple selection is indicated by a checkbox icon. As a result, in the Select component, we disable the styles used for selection in the List and apply our custom styles. All the logic related to the selected option is also contained within the Select component. We pass the indexes of the selected options to the List to correctly set the aria-selected attribute. So, this logic is still required.

@zamkovskaya zamkovskaya requested a review from korvin89 September 8, 2023 08:46
@zamkovskaya zamkovskaya merged commit 67c35a2 into gravity-ui:main Sep 12, 2023
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.

get rid of onclicks on div in the List component
5 participants