-
Notifications
You must be signed in to change notification settings - Fork 6.8k
a11y(grid-list): Add grid list to accessibility demo page #6091
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this header "Angular team dogs (grid-list with tile headers and footers)"?
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, can add "merge-ready" when ready
@@ -1,41 +1,41 @@ | |||
<section> | |||
<h2>Fixed-height grid list</h2> | |||
<md-grid-list [cols]="fixedCols" [rowHeight]="fixedRowHeight"> | |||
<h2>Types of coffee (fix-height grid-list)</h2> |
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.
nit: "fix" -> "fixed"
* 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