Skip to content

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

Merged
mmalerba merged 1 commit into
angular:masterfrom
tinayuangao:master
Sep 11, 2017
Merged

demo(list): Add accessibility demo page for list#6363
mmalerba merged 1 commit into
angular:masterfrom
tinayuangao:master

Conversation

@tinayuangao

Copy link
Copy Markdown
Contributor

No description provided.

@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 9, 2017
@tinayuangaotinayuangao 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
Copy Markdown
Contributor

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-listrole="navigation"

Thoughts?

Copy link
Copy Markdown
ContributorAuthor

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
tinayuangaoforce-pushed the master branch 2 times, most recently from 2b1e3f5 to 66b88c2CompareAugust 17, 2017 20:33

@karakara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, one nit

Comment threadsrc/lib/list/list.md Outdated
### 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
Copy Markdown
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?

Comment threadsrc/lib/list/list.ts
constructor(private _renderer: Renderer2,
private _element: ElementRef,
@Optional() private _list: MdList,
@Optional() navList: MdNavListCssMatStyler) {

Copy link
Copy Markdown
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?

@crisbetocrisbeto left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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.

Comment threadsrc/demo-app/a11y/list/list-a11y.ts Outdated
}
];

links: any[] = [

Copy link
Copy Markdown
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.

@crisbetocrisbeto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@tinayuangao

Copy link
Copy Markdown
ContributorAuthor

Thanks for review.

Removed MdNavListCssMatStyler and MdListCssMatStyler.

Comment threadsrc/lib/list/list.md Outdated
### 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
Copy Markdown
Contributor

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

Comment threadsrc/lib/list/list.md Outdated
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
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

Comments addressed. PTAL. Thanks!

@jelbournjelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jelbournjelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Aug 17, 2017
@kara

kara commented Aug 21, 2017

Copy link
Copy Markdown
Contributor

@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?

@karakara removed the action: merge The PR is ready for merge by the caretaker label Aug 21, 2017
@tinayuangao
tinayuangaoforce-pushed the master branch 2 times, most recently from cec0398 to 65f82c3CompareAugust 22, 2017 00:02
@tinayuangao
tinayuangaoforce-pushed the master branch 2 times, most recently from f6cdcf0 to 44b53bfCompareAugust 28, 2017 17:35
@tinayuangaotinayuangao added the action: merge The PR is ready for merge by the caretaker label Aug 29, 2017
@tinayuangao
tinayuangaoforce-pushed the master branch 2 times, most recently from 1453d17 to 8e2af31CompareSeptember 5, 2017 22:13
@mmalerba
mmalerba merged commit ba2f498 into angular:masterSep 11, 2017
josephperrott pushed a commit to josephperrott/components that referenced this pull request Sep 15, 2017
@angular-automatic-lock-bot

Copy link
Copy Markdown

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-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 7, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

AccessibilityThis issue is related to accessibility (a11y)action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@tinayuangao@kara@jelbourn@crisbeto@googlebot@mmalerba