Skip to content

demo(list): Add accessibility demo page for list #6363

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 1 commit into from
Sep 11, 2017

Conversation

tinayuangao
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 9, 2017
@tinayuangao tinayuangao requested a review from jelbourn August 9, 2017 00:46
@tinayuangao tinayuangao added Accessibility This issue is related to accessibility (a11y) pr: needs review labels Aug 9, 2017
<section>
<h2>Mailbox navigation</h2>
<p>Showing a navigation list with links to google search, and "more information" icon button</p>
<md-nav-list>
Copy link
Member

Choose a reason for hiding this comment

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

md-nav-list is only meant to contain <a md-list-item> children.

This makes me realize that we probably need tweaks as part of this:

  • Removing the existing roles and saying that, by default, md-list is assumed to be presentational, and add instructions to add the roles for non-interactive content (same as grid-list).
  • Give md-nav-list role="navigation"

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.

  • Made another component MdNavList for mat-nav-list with role="navigation"
  • Removed role="list" for MdList
  • Added "accessibility" section in list.md (Same as grid-list)

@tinayuangao tinayuangao force-pushed the master branch 2 times, most recently from 2b1e3f5 to 66b88c2 Compare August 17, 2017 20:33
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM, one nit

### Accessibility
By default, the list assumes that it will be used in a purely decorative fashion and thus sets no
roles, ARIA attributes, or keyboard shortcuts.
This is equivalent to having a sequence of <div> elements on the page. Any interactive content
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Missing new line before this paragraph starts?

@@ -146,9 +158,9 @@ export class MdListItem extends _MdListItemMixinBase implements AfterContentInit
constructor(private _renderer: Renderer2,
private _element: ElementRef,
@Optional() private _list: MdList,
@Optional() navList: MdNavListCssMatStyler) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we still using MdNavListCssMatStyler for anything or can we remove it now?

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM, a few nits.

</section>

<section>
<h2> Seasoning</h2>
Copy link
Member

Choose a reason for hiding this comment

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

Spacing inside the tag seems uneven.

</section>

<section>
<h2>Messages </h2>
Copy link
Member

Choose a reason for hiding this comment

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

Uneven spacing here as well.

}
];

links: any[] = [
Copy link
Member

Choose a reason for hiding this comment

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

If you remove the any[] from these arrays, TS should be able to figure out the proper type.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@tinayuangao
Copy link
Contributor Author

Thanks for review.

Removed MdNavListCssMatStyler and MdListCssMatStyler.

### Accessibility
By default, the list assumes that it will be used in a purely decorative fashion and thus sets no
roles, ARIA attributes, or keyboard shortcuts. This is equivalent to having a sequence of <div>
elements on the page. Any interactive content within the grid-list should be given an appropriate
Copy link
Member

Choose a reason for hiding this comment

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

This line still says grid-list

accessibility treatment based on the specific workflow of your application.

If the list is used to present a list of non-interactive content items, then the list element should
be given `role="list"` and each tile should be given `role="listitem"`.
Copy link
Member

Choose a reason for hiding this comment

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

tile -> list item

@tinayuangao
Copy link
Contributor Author

Comments addressed. PTAL. Thanks!

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 Aug 17, 2017
@kara
Copy link
Contributor

kara commented Aug 21, 2017

@tinayuangao There looks like there might be a real unit test failure for list here: https://travis-ci.org/angular/material2/jobs/265757068

Can you take a look?

@kara kara removed the action: merge The PR is ready for merge by the caretaker label Aug 21, 2017
@tinayuangao tinayuangao force-pushed the master branch 2 times, most recently from cec0398 to 65f82c3 Compare August 22, 2017 00:02
@tinayuangao tinayuangao requested a review from amcdnl as a code owner August 22, 2017 00:02
@tinayuangao tinayuangao force-pushed the master branch 2 times, most recently from f6cdcf0 to 44b53bf Compare August 28, 2017 17:35
@tinayuangao tinayuangao added the action: merge The PR is ready for merge by the caretaker label Aug 29, 2017
@tinayuangao tinayuangao force-pushed the master branch 2 times, most recently from 1453d17 to 8e2af31 Compare September 5, 2017 22:13
@mmalerba mmalerba merged commit ba2f498 into angular:master Sep 11, 2017
josephperrott pushed a commit to josephperrott/components that referenced this pull request Sep 15, 2017
@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