-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(chips): set appropriate aria-orientation #6464
Conversation
src/lib/chips/chip-list.ts
Outdated
@@ -45,6 +45,7 @@ import {coerceBooleanProperty} from '@angular/cdk/coercion'; | |||
host: { | |||
'[attr.tabindex]': '_tabIndex', | |||
'role': 'listbox', | |||
'aria-orientation': 'horizontal', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stacked chips are vertical.
I'm okay with the change. But I think we need to update the docs to let developers set correct aria-orientation
if they use stacked chip list.
5c0be39
to
0850a7f
Compare
Addressed the feedback. Can you take another look @tinayuangao? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/lib/chips/chips.md
Outdated
@@ -33,8 +33,19 @@ chips are neither selectable nor focusable. Currently, disabled chips receive no | |||
Users can move through the chips using the arrow keys and select/deselect them with the space. Chips | |||
also gain focus when clicked, ensuring keyboard navigation starts at the appropriate chip. | |||
|
|||
### Orientation | |||
If you want the chips in the list to be stacked verticall, instead of horizontally, you can apply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vertically
?
Based on the [accessibility guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/#Listbox), the `listbox` role has a default `aria-orientation` of `vertical`, however the chips in a chip list are horizontal.
0850a7f
to
88976d8
Compare
Based on the [accessibility guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/#Listbox), the `listbox` role has a default `aria-orientation` of `vertical`, however the chips in a chip list are horizontal.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Based on the accessibility guidelines, the
listbox
role has a defaultaria-orientation
ofvertical
, however the chips in a chip list are horizontal.