-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(a11y): Add a11y docs for table, expansion panel, dialog, chips, autocomplete… #6751
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,3 +150,13 @@ Here are the available global options: | |
| Name | Type | Description | | ||
| ----------------- | -------- | ----------- | | ||
| errorStateMatcher | Function | Returns a boolean specifying if the error should be shown | | ||
|
||
### Accessibility | ||
The `mdInput` directive works with native `<input>` to provide an accessible experience. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also mention that if you add a Possibly also worth mentioning that any |
||
|
||
If a placeholder attribute is added to the input, or a `md-placeholder` element is added | ||
in the form field, the placeholder text will automatically be used as the label for the input. | ||
If there's no placeholder specified, `aria-label`, `aria-labelledby` or `<label for=...>` should be | ||
added. | ||
|
||
Any `md-error` and `md-hint` are automatically added to the input's `aria-describedby`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,9 @@ Here are the available global options: | |
- <kbd>DOWN_ARROW</kbd>: Focus next option | ||
- <kbd>UP_ARROW</kbd>: Focus previous option | ||
- <kbd>ENTER</kbd> or <kbd>SPACE</kbd>: Select focused item | ||
|
||
### Accessibility | ||
The select component without text or label should be given a meaningful label via | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, the placeholder, hint, and error stuff will work the same way as input after the refactor. For now this is fine though |
||
`aria-label` or `aria-labelledby`. | ||
|
||
The select component has `role="listbox"` and options inside select have `role="option"`. |
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.
It would also be good to mention that the autocomplete trigger is given
role="combobox"