Skip to content
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

Accessibility Audit of Angular.io - Homepage only #16005

Closed
17 tasks done
marcysutton opened this issue Apr 14, 2017 · 18 comments
Closed
17 tasks done

Accessibility Audit of Angular.io - Homepage only #16005

marcysutton opened this issue Apr 14, 2017 · 18 comments
Assignees

Comments

@marcysutton
Copy link

marcysutton commented Apr 14, 2017

I was asked by the Angular team to do an accessibility audit of the new Angular.io. Here is the initial bug report:

Color Contrast

For font-sizes under 18px, the contrast ratio must be 4.5:1 to be visible. For large/bold text, it can be 3:1. The text and links in the footer would benefit from a darker background, or bold text / larger font size so they are more legible to people with low vision. And yes, there are low-vision web developers!

21 Color Contrast Violations

  • DEVIntersection Europe Register Button: Element has insufficient color contrast of 1.38 (foreground color: #ffffff, background color: #dbdbdb, font size: 10.5pt, font weight: normal)
  • 14 Footer Links: Element has insufficient color contrast of 4.41 (foreground color: #fafafa, background color: #1976d2, font size: 10.5pt, font weight: normal)
  • 6 White Footer Headings/Paragraphs - I audited these manually, since the background image seems to interfere. The lightest part of the background image causes a ratio just under what's accepted for WCAG 2.0 AA: http://leaverou.github.io/contrast-ratio/#hsla%28200%2C0%25%2C0%25%2C.7%29-on-%23237cd4

Misc HTML Violations

  • The element does not have a lang attribute
  • Form element missing a label: <input placeholder="Search"> - ideally this would have a visible, paired label to give it a larger hit area, but aria-label would work too

Images Missing Alt Text (6)

  • <img src="assets/images/logos/angular/angular.svg" class="hero-logo"> - Should say alt="Angular"
  • <img src="assets/images/home/responsive-framework.svg"> - Can be alt="responsive framework". Has a hover style, so it should have an alt.
  • <img src="assets/images/home/speed-performance.svg"> - Can be alt="Speed and performance" since it has a hover style
  • <img src="assets/images/home/joyful-development.png"> - Can be alt="IDE example"
  • <img src="assets/images/home/loved-by-millions.png"> - Can be alt="Angular on the map"
  • <img src="assets/images/logos/anglebrackets/devintersection.png" width="64"> - Can be empty: alt=""

Manual Audit - General

  • Headings - After the h1, the headings NOT in Search Results should be h2's, given the information hierarchy.
  • DIV.mat-sidenav-content should have role="main" to indicate the main content area as a landmark for screen reader users.
  • DEVIntersection button - needs a focus style in addition to more contrast.

Sidenav

  • Sidenav - Needs focus management on open and close. Keyboard users can't get to the menu easily.
  • Sidenav Links - No href attributes, so they aren't focusable. I'd recommend buttons for toggles instead of links.

Search Results

  • Give this region a visually hidden heading, something like "h2. Search Results". The other headings can become h3's.
  • Use unordered lists so the number of links will be counted
  • There is currently no easy way for a keyboard user to get to the search results, since they come after the rest of the DOM content. Perhaps it should be moved to come after the search field and use CSS positioning to make it a sibling in the DOM?
  • Escape key should send focus back to the triggering input

Let me know if you have any questions.

@sjtrimble
Copy link
Contributor

@marcysutton Regarding "DEVIntersection button - needs a focus style in addition to more contrast." do you mean the "Register Now" button that has a focus style or something else?

@marcysutton
Copy link
Author

@sjtrimble oh yes! That's what I meant. The "Register Now" button in that callout region.

@sjtrimble
Copy link
Contributor

@marcysutton Your comments asks for the addition of a focus style, but it already has this. I want to make sure I'm not missing anything here. Can you confirm? Thanks a bunch!

@marcysutton
Copy link
Author

@sjtrimble are you looking at a different build perhaps? The site linked above in my ticket definitely does not have a focus style for that link button–it has hover only. Here's a screenshot:

Register Now link button open in developer tools

@sjtrimble sjtrimble moved this from TODO Blockers to WIP in docs-infra Apr 20, 2017
@sjtrimble
Copy link
Contributor

@marcysutton My error!! Thanks for clarifying. Will look into that :)

@wardbell
Copy link
Contributor

wardbell commented May 1, 2017

@marcysutton regarding

Give this region a visually hidden heading, something like “h2. Search Results”. The other headings can become h3's.

I see that @sjtrimble did add the visually-hidden class in search-results.component.html. I still don’t understand how this works, what it solves, and whether we should apply similar reasoning elsewhere. Can you shed some light on this?

@wardbell
Copy link
Contributor

wardbell commented May 1, 2017

"DevIntersection Button" is checked "done" because it no longer exists.

@marcysutton
Copy link
Author

marcysutton commented May 1, 2017

@wardbell the idea is to provide a heading to the Search Results section for screen reader users, because they often navigate by headings. It could just as easily be a regular visible heading; but a using "visually-hidden" CSS preserves the existing design by hiding it from sighted users yet providing semantic structure for screen reader navigation. Making this new heading an h2 and restructuring the other Search Result headings as h3's will make it into a proper content hierarchy.

There are multiple ways to code visually hidden CSS; this method should work fine.

@wardbell
Copy link
Contributor

wardbell commented May 2, 2017

@marcysutton Can we use <section>/<article> instead of <h2>/<h3>? It's not something that you can link to. It's just a label for a collection of results (if there happen to be any).

wardbell added a commit to IdeaBlade/angular that referenced this issue May 2, 2017
This enables keyboarders to tab from the search box into the results.
Important for a11y according to issue angular#16005.
@wardbell
Copy link
Contributor

wardbell commented May 2, 2017

PR #16468 Moves search results under search box (just below the top toolbar). The first tab out of the search box ends up in the first result. I believe that's what was necessary to check a box in the Search Results section above.

@wardbell
Copy link
Contributor

wardbell commented May 2, 2017

@marcysutton regarding Search Results item:

Escape key should send focus back to the triggering input

I think it does that now. When I type in the search box and hit escape, I stay in the search box.

What behavior are we missing? If I mouse or tab out of the search box and then hit escape, I do not return to the search box. Should I? Is that what you mean?

@gkalpak
Copy link
Member

gkalpak commented May 2, 2017

I am pretty sure that's what she meant 😃

matsko pushed a commit that referenced this issue May 2, 2017
This enables keyboarders to tab from the search box into the results.
Important for a11y according to issue #16005.
petebacondarwin added a commit to petebacondarwin/angular that referenced this issue May 12, 2017
For improved accessibility, the focus should be sent
back to the input box when we are displaying the
search results and the user hits ESC.

See angular#16005
petebacondarwin added a commit to petebacondarwin/angular that referenced this issue May 13, 2017
For improved accessibility, the focus should be sent
back to the input box when we are displaying the
search results and the user hits ESC.

See angular#16005
petebacondarwin added a commit that referenced this issue May 14, 2017
For improved accessibility, the focus should be sent
back to the input box when we are displaying the
search results and the user hits ESC.

See #16005
@petebacondarwin
Copy link
Member

Fixed

Escape key should send focus back to the triggering input

in #16758

@petebacondarwin
Copy link
Member

Fixed:

Sidenav Links - No href attributes, so they aren't focusable. I'd recommend buttons for toggles instead of links.

in #16807

@petebacondarwin
Copy link
Member

All the checkboxes are ticked!

@petebacondarwin petebacondarwin removed this from WIP in docs-infra May 17, 2017
@marcysutton
Copy link
Author

Noting that there may still be additional issues on other pages in the absence of a full audit, I found another serious item. The header-link anchor tags used to deep link headings are poorly constructed:

The anchors have aria-hidden="true" but they still have hrefs, causing what we call "ghost controls" with no accessibility information when focused. Pair that with a hover state on the child icon element only and no focus state to make them visible, and they are pretty bad accessibility-wise.

Here's a screenshot:
aio-header-links

To fix these, I'd move the hover state to the anchor and add a focus state at the same time. Remove aria-hidden="true" and they should work better.

@petebacondarwin
Copy link
Member

Moving the issue with the heading anchors to a new issue: #16854

asnowwolf pushed a commit to asnowwolf/angular that referenced this issue Aug 11, 2017
This enables keyboarders to tab from the search box into the results.
Important for a11y according to issue angular#16005.
asnowwolf pushed a commit to asnowwolf/angular that referenced this issue Aug 11, 2017
For improved accessibility, the focus should be sent
back to the input box when we are displaying the
search results and the user hits ESC.

See angular#16005
juleskremer pushed a commit to juleskremer/angular that referenced this issue Aug 28, 2017
This enables keyboarders to tab from the search box into the results.
Important for a11y according to issue angular#16005.
juleskremer pushed a commit to juleskremer/angular that referenced this issue Aug 28, 2017
For improved accessibility, the focus should be sent
back to the input box when we are displaying the
search results and the user hits ESC.

See angular#16005
@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 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants