Skip to content

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

Merged
merged 9 commits into from
Oct 30, 2017

Conversation

amcdnl
Copy link
Contributor

@amcdnl amcdnl commented Aug 26, 2017

No description provided.

@amcdnl amcdnl self-assigned this Aug 26, 2017
@amcdnl amcdnl requested a review from tinayuangao August 26, 2017 18:06
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 26, 2017
@tinayuangao tinayuangao added Accessibility This issue is related to accessibility (a11y) pr: needs review labels Aug 29, 2017
</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>
Copy link
Contributor

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">
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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">
Copy link
Member

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

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Sep 5, 2017
@tinayuangao
Copy link
Contributor

@amcdnl You need to export interface UserData

import {Observable} from 'rxjs/Observable';
import {MdSort, MdPaginator} from '@angular/material';

interface UserData {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. :)

@kara
Copy link
Contributor

kara commented Oct 2, 2017

@amcdnl Can you rebase?

@kara kara added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Oct 2, 2017
@amcdnl
Copy link
Contributor Author

amcdnl commented Oct 3, 2017

@kara - done :)

@kara kara added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Oct 3, 2017
@kara
Copy link
Contributor

kara commented Oct 3, 2017

@amcdnl Can you check out the CI failure? Sorryyy

@kara kara removed the action: merge The PR is ready for merge by the caretaker label Oct 3, 2017
@amcdnl
Copy link
Contributor Author

amcdnl commented Oct 3, 2017

Ok, how about now :)

@jelbourn
Copy link
Member

Is there a real CI failure? aot task looks to be failing

@amcdnl
Copy link
Contributor Author

amcdnl commented Oct 30, 2017

Ah, Md vs Mat was causing it. Fixed.

@jelbourn jelbourn added action: merge The PR is ready for merge by the caretaker pr: merge safe labels Oct 30, 2017
@mmalerba mmalerba merged commit c5cbe18 into angular:master Oct 30, 2017
@amcdnl amcdnl deleted the a11y-table branch November 1, 2017 15:42
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants