Skip to content

a11y(toolbar): Add toolbar accessibility demo page #6145

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
Aug 23, 2017

Conversation

amcdnl
Copy link
Contributor

@amcdnl amcdnl commented Jul 29, 2017

Created accessibility demo page demonstrating:

  • Basic Display
  • Multiple Lines
  • Icons
  • Colors

@amcdnl amcdnl requested a review from tinayuangao July 29, 2017 16:54
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 29, 2017
@@ -0,0 +1,28 @@
<div class="demo-toolbar">
<section>
<h2>Display</h2>
Copy link
Contributor

Choose a reason for hiding this comment

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

Put use case in h2


<section>
<h2>Multiple Lines Toolbar</h2>
<md-toolbar>Line 1</md-toolbar>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use real world example?

<md-toolbar>
<span>My App</span>
<span class="example-spacer"></span>
<md-icon class="example-icon">favorite</md-icon>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add aria-label for icon

Copy link
Member

@jelbourn jelbourn Aug 2, 2017

Choose a reason for hiding this comment

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

md-icons actually are aria-hidden by default. They should only be made aria-hidden="false" if they're communicating some information. See the accessibility section of the icon docs.

In this case, having an icon sitting by itself in the toolbar isn't very realistic to a real app; it would either be an indicator for something or an action.

@tinayuangao tinayuangao added Accessibility This issue is related to accessibility (a11y) pr: needs review labels Aug 1, 2017
@tinayuangao tinayuangao requested a review from jelbourn August 1, 2017 17:32
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.

The PR title says "a11y(checkbox)"

<div class="demo-toolbar">
<section>
<h2>Basic Toolbar with Text (e.g. Only display app’s name)</h2>
<md-toolbar>My App</md-toolbar>
Copy link
Member

Choose a reason for hiding this comment

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

A toolbar by itself isn't really representative of how the component will be used. It typically acts as a header for some content. In this capacity, it should either use role="heading" and aria-level OR it should contain a header element (h1 -> h6).

The examples should represent a real use-case as much as possible.

@amcdnl amcdnl changed the title a11y(checkbox): Add toolbar accessibility demo page #6121 a11y(toolbar): Add toolbar accessibility demo page #6121 Aug 5, 2017
@@ -26,6 +26,7 @@ export class AccessibilityDemo {
{name: 'Grid list', route: 'grid-list'},
{name: 'Input', route: 'input'},
{name: 'Radio buttons', route: 'radio'},
{name: 'Slider', route: 'slider'},
{name: 'Toolbar', route: 'toolbar'},
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: put 'Toolbar' after 'Slider'

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 :)

<md-toolbar>
<span>My App</span>
<span class="example-spacer"></span>
<md-icon aria-label="favorite">favorite</md-icon>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is aria-label working on md-icon? Consider adding a span with cdk-visually-hidden or make it a button/link?
https://material.angular.io/components/icon/overview

<h2>Basic Toolbar with Text (e.g. Only display app’s name)</h2>
<md-toolbar role="heading">
<h1>My App</h1>
</md-toolbar>
Copy link
Member

Choose a reason for hiding this comment

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

I wasn't very clear in the last comments: each toolbar should have some actual content under it as well (that the toolbar describes; can just be a <p>)

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 15, 2017
@kara kara added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Aug 21, 2017
@kara
Copy link
Contributor

kara commented Aug 21, 2017

@amcdnl Can you rebase this?

@kara kara added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Aug 21, 2017
@kara kara changed the title a11y(toolbar): Add toolbar accessibility demo page #6121 a11y(toolbar): Add toolbar accessibility demo page Aug 21, 2017
@kara kara merged commit 595cffd into angular:master Aug 23, 2017
@amcdnl amcdnl deleted the a11y-toolbar branch August 23, 2017 23:25
@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 6, 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.

5 participants