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(chip): Add aria-selected to chip #5920
Conversation
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.
What prompted this change? aria-selected
doesn't seem to apply to role="listitem"
?
https://www.w3.org/TR/wai-aria/states_and_properties#aria-selected
src/lib/chips/chip.spec.ts
Outdated
@@ -184,6 +193,15 @@ describe('Chips', () => { | |||
expect(chipInstance.selected).toBeFalsy(); | |||
expect(testComponent.chipSelect).not.toHaveBeenCalled(); | |||
}); | |||
|
|||
it('should have empty aria-selected', () => { | |||
expect(chipNativeElement.getAttribute('aria-selected')).toBe(''); |
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.
Should this be expect(chipNativeElement.hasAttribute('aria-selected')).toBe(false);
?
Our current MdChip's role is The reason for this change is screen reader has no indicator when user select/deselect a chip. |
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.
Ah, I misremembered
LGTM
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. |
No description provided.