Repository navigation
a11y(grid-list): Add grid list to accessibility demo page - #6091
Conversation
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
| {text: 'One', cols: 3, rows: 1, color: 'lightblue'}, | ||
| {text: 'Two', cols: 1, rows: 2, color: 'lightgreen'}, | ||
| {text: 'Three', cols: 1, rows: 1, color: 'lightpink'}, | ||
| {text: 'Four', cols: 2, rows: 1, color: '#DDBDF1'}, |
There was a problem hiding this comment.
Same comment on having more "real world" text
| <md-grid-list cols="3" rowHeight="200px"> | ||
| <md-grid-tile *ngFor="let dog of dogs"> | ||
| <md-grid-tile-header>{{dog.name}}</md-grid-tile-header> | ||
| <img [alt]="dog.name" src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png"> |
There was a problem hiding this comment.
Right now the tiles have role="listitem". Is it valid for a listitem to contain an img? It will probably be a common use case for people to want to include images in a gird-list, so we should figure out what the best practice is here.
I'm thinking that it might make sense to have grid-list change to not use list-based roles by default and assume the default use-case is for page layout with users having the option to add list roles (which we would outline in our docs). Thoughts?
There was a problem hiding this comment.
I think role="listitem" is okay to contain images. The description in w3c https://www.w3.org/TR/wai-aria/roles#list says it' document structure with non-interactive elements. It doesn't say it cannot contain images.
I'm okay to remove the default roles in grid list and grid tile, as users may want to use them as interactive elements.
| <md-grid-list cols="3" rowHeight="200px"> | ||
| <md-grid-tile *ngFor="let dog of dogs"> | ||
| <md-grid-tile-header>{{dog.name}}</md-grid-tile-header> | ||
| <img [alt]="dog.name" src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png"> |
There was a problem hiding this comment.
The alt should be something like "Photo of ..."
| @@ -0,0 +1,42 @@ | |||
| <section> | |||
| <h2>Fixed-height grid list</h2> | |||
| <md-grid-list [cols]="fixedCols" [rowHeight]="fixedRowHeight"> | |||
There was a problem hiding this comment.
With the list roles removed from the components, should we add them to the demos for these cases that are non-interactive content?
| @@ -0,0 +1,42 @@ | |||
| <section> | |||
| <h2>Fixed-height grid list</h2> | |||
There was a problem hiding this comment.
Make this header "Types of coffee (fix-height grid-list)"?
| </section> | ||
|
|
||
| <section> | ||
| <h2>Ratio-height grid list</h2> |
There was a problem hiding this comment.
Make this header "Types of coffee (fix-height grid-list)"?
| </section> | ||
|
|
||
| <section> | ||
| <h2>Grid list with header and footer</h2> |
There was a problem hiding this comment.
Make this header "Angular team dogs (grid-list with tile headers and footers)"?
jelbourn
left a comment
There was a problem hiding this comment.
LGTM, can add "merge-ready" when ready
| <section> | ||
| <h2>Fixed-height grid list</h2> | ||
| <md-grid-list [cols]="fixedCols" [rowHeight]="fixedRowHeight"> | ||
| <h2>Types of coffee (fix-height grid-list)</h2> |
* In releases there will be a constant called `VERSION` that holds the current version of the installed package (material or cdk) * This is similar as for every @angular package like core, forms, compiler. Add accessibility demo page for grid list .
|
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. |
Remove the default roles in grid list and grid tile