Accessibility/Guidelines: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Added a Resources section for further reading to help meet the requirements.)
(→‎Resources: added A11y 101 lightning talks playlist AirMo link)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Mozilla Accessibility Release Requirements}}
{{DISPLAYTITLE:Mozilla Accessibility Release Guidelines}}


== Introduction ==
== Introduction ==
At Mozilla, accessibility is a fundamental part of our mission to ensure the internet is "open and accessible to all," helping to empower people, regardless of their abilities, to contribute to the common good.
At Mozilla, accessibility is a fundamental part of our mission to ensure the internet is "open and accessible to all," helping to empower people, regardless of their abilities, to contribute to the common good.
To that end, this document outlines accessibility requirements which should be checked before a Mozilla product or feature is considered release-ready.


== All markup languages (HTML, XUL) ==
To that end, this document outlines accessibility guidelines and resources which should be referenced before a Mozilla product or feature is considered release-ready.
* Is the markup semantic, wherever possible? Are buttons, checkboxes, links, list boxes, etc. used from the native host language?
 
* If custom widgets had to be implemented (including containers like toolbars, dialogs, labelled groups, etc.), are they augmented with the proper WAI-ARIA roles, states and properties?
== General Considerations ==
* Are custom widgets also operable with the keyboard?
 
* Is the focus visible even when a mouse is not used?
When working in the following areas, we've provided a general list of considerations when designing, implementing, and testing accessibility. This is not exhaustive and you will find more best practices and guidance in the detailed resources provided.
* For content: Are proper headings, lists, tables, etc. used semantically where appropriate?
 
* Are images either given meaningful alternative text or marked as decorative with alt=””?
=== Markup languages (HTML, XUL) ===
* Are form controls properly associated with a label for screen reader accessibility and bigger click targets for people who cannot accurately move the mouse or finger?
 
* If controls or content are effectively hidden visually, are they also hidden semantically using the hidden attribute, CSS display: none, CSS visibility: hidden or aria-hidden?
All of the below can be checked with either the [http://developer.mozilla.org/en-US/docs/Tools/Accessibility_inspector accessibility inspector in the Developer Tools toolbox] and/or by navigating the user interface with a keyboard.
* Is focus set appropriately when a new screen or a pop-up appears or is dismissed? For example, when a pop-up appears, is focus moved to a control inside the pop-up? When a pop-up is dismissed, does focus return to the element which was focused before the pop-up appeared?
 
* Is the '''markup semantic''', wherever possible?
* Are buttons, checkboxes, links, list boxes, etc. used from the native host language?
* Are proper headings, lists, tables, etc. used semantically where appropriate?
* If controls or content are visually hidden, are they also '''semantically hidden''' using the hidden attribute, CSS display: none, CSS visibility: hidden or aria-hidden?
* Are '''custom widgets''' (containers like toolbars, dialogs, labelled groups, etc.), augmented with the proper [http://www.w3.org/WAI/standards-guidelines/aria/ WAI-ARIA] roles, states and properties?
* Are custom widgets operable with the keyboard?
* Is the '''focus''' visible, even when a mouse is not used?
* When a new '''screen, notification, or pop-up''' appears or is dismissed is the focus set appropriately? For example, when a pop-up appears, is focus moved to a control inside the pop-up? When a pop-up is dismissed, does focus return to the element which was focused before the pop-up appeared?
* Is meaningful '''alternative text''' provided for images (or marked as decorative with an empty alt=””)?
* Are '''form controls''' associated with a label for screen reader accessibility and bigger click targets for people who cannot accurately move the mouse or finger?
 
=== Text ===


All of the above can be checked with either the accessibility inspector in the developer tools, or by operating the UI with a keyboard.
Applies to markup languages and native user interfaces.


== Text ==
* Does the text (color) have enough '''contrast''' to the background so it conforms to [http://www.w3.org/TR/WCAG21/#contrast-enhanced WCAG 2.1 standards]? For example, normal text must have a contrast ratio of 4.5:1 with its background to be valid.
Applies to both markup languages and native UI.
* Is the text '''zoomable''' and/or flow in the interface as expected?
* Does text respect Bold text or Large Text, and other text-related accessibility settings?
* Do '''errors or other information indicators''' get communicated with more than color? For example, instead of saying “Correct all fields marked in red”, provide contextual error messages everybody can relate to, including color-blind people (roughly 8% of the population).


* Does text have enough contrast to the background so it conforms to WCAG 2.1 standards? For example, normal text must have a contrast ratio of 4.5:1 with its background to be valid. (This can be checked in the developer tools.)
=== Mobile ===
* Is text zoomable?
* For iOS: Does text adhere to the Dynamic Type Accessibility setting?
* Does it respect Bold text or Large Text, and other text-related accessibility settings?
* Android: Is zoom working properly with the UI?
* Do errors or other information indicators get communicated via more than color alone? For example, instead of saying “Correct all fields marked in red”, provide real contextual error messages everybody can clearly relate to, including color-blind people (roughly 8% of the population).


== Mobile native UI ==
* Does text respect Bold text or Large Text, and other '''text-related''' accessibility settings?
* iOS and Android: Are controls properly labeled with accessibilityLabel or contentDescription?
* Android: when you [http://support.google.com/accessibility/android/answer/6006949?hl=en Zoom], does the text work as expected within the UI?
* Are controls actionable with VoiceOver or TalkBack gestures (tap to select, double-tap to activate)?
* iOS: Does text adhere to the [http://developer.apple.com/design/human-interface-guidelines/accessibility/overview/text-size-and-weight/ Dynamic Type Accessibility] setting?
* iOS and Android: Are '''controls properly labeled''' with accessibilityLabel or contentDescription?
* Are controls actionable with '''VoiceOver or TalkBack gestures''' (tap to select, double-tap to activate)?
* Do custom elements expose proper accessibility semantics on all platforms? For example, for a custom slider on iOS, does accessibilityTraits include the adjustable trait and are the accessibilityIncrement and accessibilityDecrement methods implemented?
* Do custom elements expose proper accessibility semantics on all platforms? For example, for a custom slider on iOS, does accessibilityTraits include the adjustable trait and are the accessibilityIncrement and accessibilityDecrement methods implemented?
* If controls or content are effectively hidden visually, are they also hidden semantically; e.g. using the accessibilityElementsHidden property on iOS?
* If controls or content are effectively hidden visually, are they also hidden semantically; e.g. using the accessibilityElementsHidden property on iOS?
* Do system settings such as Zoom, Reduce Animations/Motion and Dynamic Type affect the UI as appropriate?
* Do system settings such as Zoom, Reduce Animations/Motion and Dynamic Type affect the UI as appropriate?
* Is the touch target size for controls sufficiently large, 48x48 device pixels for Android and 44x44 for iOS?
== Testing and Tools ==
=== Web Content and Browser ===
* [http://hacks.mozilla.org/2019/10/auditing-for-accessibility-problems-with-firefox-developer-tools/ Introduction to the auditing features of the accessibility inspector]
* Video on how to [http://www.youtube.com/watch?v=0FiQZnkKglk test keyboard accessibility]
* [http://developer.mozilla.org/en-US/docs/Tools/Accessibility_inspector Accessibility inspector in the Firefox Developer Tools toolbox]
* [http://developer.apple.com/library/archive/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXTestingApps.html Accessibility Inspector on macOS]
* [http://www.youtube.com/watch?v=0FiQZnkKglk Test keyboard accessibility]
=== Mobile ===
* [http://www.deque.com/blog/intro-accessibility-inspector-tool-ios-native-apps/ Introduction to Accessibility Inspector for iOS in Xcode] on the Deque blog
=== Color Contrast and Color Blindness ===
Preliminary documentation [http://docs.google.com/document/d/1El3XJiAdA5gFcG7H9iI1dNmLbht0hXfi_oKBZPWx3t0/edit?usp=sharing available here]
High Contrast Mode is a solution implemented in operating systems and applications like Firefox. To enable it when testing:
* Windows: Settings > Ease of Access > High Contrast Mode
* macOS: System Preferences > Accessibility > Display > Increase Contrast (Note: you may also need to adjust about:preferences in Language & Appearance > Colors > (menulist) Only with High Contrast Themes)
* Linux: Accessibility menu > High contrast
* Firefox: Language & Appearance > Colors > (menulist) Always (Note: for this configuration, you should not have any OS-level contrast preference enabled.)
Video guide to [http://www.youtube.com/watch?v=eBefjaWud-M&t=388s testing color contrast and simulating color blindness].
High contrast design guide for Firefox [[Accessibility/Design_Guide|available here]].
=== Screen Readers ===
* Orca for Ubuntu: http://help.ubuntu.com/stable/ubuntu-help/a11y-screen-reader.html.en
* NVDA for Windows: http://www.nvaccess.org/download/
* VoiceOver for macOS: http://support.apple.com/guide/voiceover/welcome/mac


== Resources ==
== Resources ==
Here are some resources that you might find useful when working towards meeting the above requirements.


* For markup languages such as HTML
Here are some resources that you might find useful when working towards meeting the above requirements. Some broad and general material is provided here with more specific categories below:
** [http://developer.mozilla.org/en-US/docs/Learn/Accessibility The front page of learning accessibility on MDN]. Use this to jump to the topic you need more information on.
 
** [http://hacks.mozilla.org/2019/10/auditing-for-accessibility-problems-with-firefox-developer-tools/ Introduction to the auditing features of the accessibility inspector], also available as a video series:
* [http://www.w3.org/WAI/business-case/ The Business Case for Digital Accessibility]
*** [http://www.youtube.com/watch?v=7mqqgIxX_NU Understanding website accessibility]
* [http://www.w3.org/WAI/perspective-videos/ W3C Web Accessibility Perspectives Videos]
*** [http://www.youtube.com/watch?v=0FiQZnkKglk Test keyboard accessibility]
* [http://www.youtube.com/watch?v=uE543v8kj50 Inclusive Design: Unlearning to Include and Innovate]: A talk given by Jutta Treviranus as part of the Mozilla monthly speaker series which, while somewhat heavy, provides valuable insight into the importance of inclusive design and accessibility beyond the typical understanding of why we should care.
*** [http://www.youtube.com/watch?v=eBefjaWud-M&t=388s Testing color contrast and simulating color blindness]
* [http://webaim.org/articles/ WebAIM's articles] are a good place to get an introduction to web accessibility (and accessibility in general)
*** [http://www.youtube.com/watch?v=YhlAVlfH0rQ Test for text label issues]
* [http://www.penguinrandomhouse.com/books/561049/what-can-a-body-do-by-sara-hendren/ Book: What Can a Body Do? By Sara Hendren]
* For Android
* Video of presentations from the [http://www.youtube.com/playlist?list=PLvsKqlNNP3R-Y274Vw7435FOSXLbFMXHQ Monki Gras 2019 conference on Accessibility]
** [http://developer.android.com/guide/topics/ui/accessibility/apps Make apps more accessible] on Android Developers.
* http://www.bbc.co.uk/accessibility/
** [http://developer.android.com/guide/topics/ui/accessibility/principles Prinicples for improving app accessibility] on Android Developers.
* http://www.gov.uk/guidance/accessibility-requirements-for-public-sector-websites-and-apps
** [http://developer.android.com/guide/topics/ui/accessibility/testing Test your app's accessibility] on Android Developers.
 
* For iOS
=== Mozilla Internal Only ===
** [http://developer.apple.com/accessibility/ios/ Introduction to accessibility on iOS] on Apple Developer.
 
** [http://developer.apple.com/videos/frameworks/accessibility/ WWDC session videos].
* [http://mozilla.hosted.panopto.com/Panopto/Pages/Sessions/List.aspx#folderID=%22d0a3f26d-a309-45a2-967e-b25f011d50ac%22 Accessibility 101 series of Lightning Talks playlist] (Mozilla internal only) by Anna Yeddi and Kim Bryant
** [http://developer.apple.com/documentation/uikit/accessibility/ UIKit accessibility reference].
* [http://drive.google.com/u/0/open?id=1sQHupBsqSxnCEGFWEIz0NMyxnUBMxPhA UX training deck] (Mozilla internal only) by Billy Gregory of Paciello Group
** [http://www.deque.com/blog/intro-accessibility-inspector-tool-ios-native-apps/ Introduction to Accessibility Inspector for iOS in Xcode] on the Deque blog.
* Asa's [http://mozilla.zoom.us/rec/play/65R_I-v8qG03Hoac4wSDC6csW43vKf2s0yEarqYInh21B3QLMAGjYeMQM-BmpmwOdTGZzCZTRcwNPwc1?autoplay=true accessibility basics] presentation (Mozilla internal only)
* Jamie and Morgan's presentation on Accessibility Reviews at [http://docs.google.com/presentation/d/1H_tCIcjwyUANoyYoODVmN-ZUya1EQNcaqCR4P_MPeGw/edit#slide=id.gcf47d5f7c4_0_9 Firefox Weekly All Hands on April 15, 2021] ([http://mozilla.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=ee092037-1a65-43af-ab19-acf700f3fefa&start=2262.295 recording beginning around 38 minutes])
* Udemy: [http://mozilla.udemy.com/course/accessibility_ux/ Introduction to UX Design for Accessibility and WCAG 2.0] - A concise guide to meeting WCAG standards from a UX perspective
* Udemy: [http://mozilla.udemy.com/course/creating-accessible-websites/ Creating Accessible Websites] - Achieve WCAG compliance by learning accessibility testing, WAI-ARIA, and website optimization for screen readers
* Udemy: [http://mozilla.udemy.com/course/web-content-accessibility-guidelines-wcag-21-simplified/ WCAG 2.1 / 2.2 Simplified With Examples] - Improve your web accessibility knowledge by learning WCAG with practical examples
 
 
=== Web and Markup languages ===
 
* [http://developer.mozilla.org/en-US/docs/Learn/Accessibility Learning accessibility on MDN]: Use this to jump to many webe accessibility topics and guides
* [http://hacks.mozilla.org/2019/10/auditing-for-accessibility-problems-with-firefox-developer-tools/ Introduction to the auditing features of the accessibility inspector], also available as a video series:
** [http://www.youtube.com/watch?v=7mqqgIxX_NU Understanding website accessibility]
** [http://www.youtube.com/watch?v=0FiQZnkKglk Test keyboard accessibility]
** [http://www.youtube.com/watch?v=eBefjaWud-M&t=388s Testing color contrast and simulating color blindness]
** [http://www.youtube.com/watch?v=YhlAVlfH0rQ Test for text label issues]
* [http://dequeuniversity.com/curriculum/packages/web Dequeue self-guided course on web accessibility]
* [http://www.edx.org/course/web-accessibility-introduction Edx online course on web accessibility]
* [http://polypane.app/blog/forced-colors-explained-a-practical-guide Forced colors explained: A practical guide]
 
=== Mobile ===
 
==== Android ====
 
* [http://developer.android.com/guide/topics/ui/accessibility/apps Make apps more accessible] on Android Developers
* [http://developer.android.com/guide/topics/ui/accessibility/principles Prinicples for improving app accessibility] on Android Developers
* [http://developer.android.com/guide/topics/ui/accessibility/testing Test your app's accessibility] on Android Developers
 
==== iOS ====
* [http://developer.apple.com/accessibility/ios/ Introduction to accessibility on iOS] on Apple Developer
* [http://developer.apple.com/videos/frameworks/accessibility/ WWDC session videos]
* [http://developer.apple.com/documentation/uikit/accessibility/ UIKit accessibility reference]

Latest revision as of 20:23, 23 January 2025


Introduction

At Mozilla, accessibility is a fundamental part of our mission to ensure the internet is "open and accessible to all," helping to empower people, regardless of their abilities, to contribute to the common good.

To that end, this document outlines accessibility guidelines and resources which should be referenced before a Mozilla product or feature is considered release-ready.

General Considerations

When working in the following areas, we've provided a general list of considerations when designing, implementing, and testing accessibility. This is not exhaustive and you will find more best practices and guidance in the detailed resources provided.

Markup languages (HTML, XUL)

All of the below can be checked with either the accessibility inspector in the Developer Tools toolbox and/or by navigating the user interface with a keyboard.

  • Is the markup semantic, wherever possible?
  • Are buttons, checkboxes, links, list boxes, etc. used from the native host language?
  • Are proper headings, lists, tables, etc. used semantically where appropriate?
  • If controls or content are visually hidden, are they also semantically hidden using the hidden attribute, CSS display: none, CSS visibility: hidden or aria-hidden?
  • Are custom widgets (containers like toolbars, dialogs, labelled groups, etc.), augmented with the proper WAI-ARIA roles, states and properties?
  • Are custom widgets operable with the keyboard?
  • Is the focus visible, even when a mouse is not used?
  • When a new screen, notification, or pop-up appears or is dismissed is the focus set appropriately? For example, when a pop-up appears, is focus moved to a control inside the pop-up? When a pop-up is dismissed, does focus return to the element which was focused before the pop-up appeared?
  • Is meaningful alternative text provided for images (or marked as decorative with an empty alt=””)?
  • Are form controls associated with a label for screen reader accessibility and bigger click targets for people who cannot accurately move the mouse or finger?

Text

Applies to markup languages and native user interfaces.

  • Does the text (color) have enough contrast to the background so it conforms to WCAG 2.1 standards? For example, normal text must have a contrast ratio of 4.5:1 with its background to be valid.
  • Is the text zoomable and/or flow in the interface as expected?
  • Does text respect Bold text or Large Text, and other text-related accessibility settings?
  • Do errors or other information indicators get communicated with more than color? For example, instead of saying “Correct all fields marked in red”, provide contextual error messages everybody can relate to, including color-blind people (roughly 8% of the population).

Mobile

  • Does text respect Bold text or Large Text, and other text-related accessibility settings?
  • Android: when you Zoom, does the text work as expected within the UI?
  • iOS: Does text adhere to the Dynamic Type Accessibility setting?
  • iOS and Android: Are controls properly labeled with accessibilityLabel or contentDescription?
  • Are controls actionable with VoiceOver or TalkBack gestures (tap to select, double-tap to activate)?
  • Do custom elements expose proper accessibility semantics on all platforms? For example, for a custom slider on iOS, does accessibilityTraits include the adjustable trait and are the accessibilityIncrement and accessibilityDecrement methods implemented?
  • If controls or content are effectively hidden visually, are they also hidden semantically; e.g. using the accessibilityElementsHidden property on iOS?
  • Do system settings such as Zoom, Reduce Animations/Motion and Dynamic Type affect the UI as appropriate?
  • Is the touch target size for controls sufficiently large, 48x48 device pixels for Android and 44x44 for iOS?

Testing and Tools

Web Content and Browser

Mobile

Color Contrast and Color Blindness

Preliminary documentation available here

High Contrast Mode is a solution implemented in operating systems and applications like Firefox. To enable it when testing:

  • Windows: Settings > Ease of Access > High Contrast Mode
  • macOS: System Preferences > Accessibility > Display > Increase Contrast (Note: you may also need to adjust about:preferences in Language & Appearance > Colors > (menulist) Only with High Contrast Themes)
  • Linux: Accessibility menu > High contrast
  • Firefox: Language & Appearance > Colors > (menulist) Always (Note: for this configuration, you should not have any OS-level contrast preference enabled.)

Video guide to testing color contrast and simulating color blindness.

High contrast design guide for Firefox available here.

Screen Readers


Resources

Here are some resources that you might find useful when working towards meeting the above requirements. Some broad and general material is provided here with more specific categories below:

Mozilla Internal Only


Web and Markup languages

Mobile

Android

iOS