-
Notifications
You must be signed in to change notification settings - Fork 6.8k
a11y(table): add basic, sort, pager demos for a11y #6498 #6653
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
</ng-container> | ||
<ng-container cdkColumnDef="color"> | ||
<md-header-cell *cdkHeaderCellDef>Color</md-header-cell> | ||
<md-cell *cdkCellDef="let row" [style.color]="row.color">{{row.color}}</md-cell> |
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.
Some colors are hard to read like yellow. Can we make this more accessible? We can remove the styled colors
<section> | ||
<h2>Basic Table</h2> | ||
<p>Shows name, color and age data.</p> | ||
<md-table [dataSource]="basicDataSource"> |
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 took a quick looks at the guidance for role="grid"
: https://www.w3.org/TR/wai-aria/roles#grid
Something we missed earlier is that
A grid is considered editable unless otherwise specified.
We either need to add aria-readonly
here, or we need to make the table set it by default. @andrewseguin 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.
If the table has contents that are editable that would be misrepresentative of the contents. Its really up to the user implementing this to make that decision IMO.
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 was thinking the table would have something like editable
that defaults to false, but we can sort that out later.
For now, just add aria-readonly
to the md-table
in the demo
<section> | ||
<h2>Basic Table</h2> | ||
<p>Shows name, color and age data.</p> | ||
<md-table [dataSource]="basicDataSource"> |
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.
Would be good to add an aria-label
to the table element
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
@amcdnl You need to |
import {Observable} from 'rxjs/Observable'; | ||
import {MdSort, MdPaginator} from '@angular/material'; | ||
|
||
interface UserData { |
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.
Here UserData should be exported
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.
done. :)
@amcdnl Can you rebase? |
@kara - done :) |
@amcdnl Can you check out the CI failure? Sorryyy |
Ok, how about now :) |
Is there a real CI failure? aot task looks to be failing |
Ah, |
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.