File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,24 @@ To add a divider, use `<mat-divider>`.
152
152
```
153
153
154
154
### Accessibility
155
+ The type of list used in any given situation depends on how the end-user will be interacting with
156
+ the it.
157
+
158
+ #### Navigation
159
+ When the list-items navigate somewhere, ` <mat-nav-list> ` should be used with ` <a mat-list-item> `
160
+ elements as the list items. The nav-list will be rendered using ` role="navigation" ` and can be
161
+ given an ` aria-label ` to give context on the set of navigation options presented. Additional
162
+ interactive content, such as buttons, should _ not_ be added inside the anchors.
163
+
164
+ #### Selection
165
+ When the list is primarily used to select one or more values, a ` <mat-selection-list> ` should be
166
+ used with ` <mat-list-option> ` , which map to ` role="listbox" ` and ` role="option" ` , respectively. The
167
+ list should be given an ` aria-label ` that describes the value or values being selected. Each option
168
+ should _ not_ contain any additional interactive elements, such as buttons.
169
+
170
+ #### Custom scenarios
155
171
By default, the list assumes that it will be used in a purely decorative fashion and thus sets no
156
- roles, ARIA attributes, or keyboard shortcuts. This is equivalent to having a sequence of <div >
172
+ roles, ARIA attributes, or keyboard shortcuts. This is equivalent to having a sequence of ` <div> `
157
173
elements on the page. Any interactive content within the list should be given an appropriate
158
174
accessibility treatment based on the specific workflow of your application.
159
175
You can’t perform that action at this time.
0 commit comments