Skip to content

Commit fe9479e

Browse files
authored
Merge pull request #429 from ymrl/add-a11y-visualizer-explanation
Accessibility Visualizerを使ったチェック方法の解説を追加
2 parents c451d6d + a27d5fa commit fe9479e

4 files changed

Lines changed: 502 additions & 0 deletions

File tree

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
.. _exp-a11y-visualizer:
2+
3+
########################################################
4+
Checking Accessibility With Accessibility Visualizer
5+
########################################################
6+
7+
`Accessibility Visualizer <https://github.com/ymrl/a11y-visualizer>`__ is a browser extension that overlays information that is important for improving the accessibility of Web pages, but is not visually visible, onto the pages themselves.
8+
9+
It allows you to check information such as alternative text for images, heading levels, labels of form controls, table structures, lists, language attributes, and WAI-ARIA attributes while looking at the page.
10+
It can also visually display changes in the content of ARIA live regions created by ``role="status"``, ``role="alert"``, ``role="log"``, the ``aria-live`` attribute, and the ``output`` element.
11+
12+
Until now, this information could only be verified by reading the accessibility tree in the browser's developer tools, reading the source code, or actually operating the page with a screen reader.
13+
With Accessibility Visualizer, you can check this information while coding or verifying behavior, even without such knowledge or experience.
14+
15+
*******************************************************************
16+
The Role of Accessibility Visualizer in Accessibility Checks
17+
*******************************************************************
18+
19+
The information displayed by Accessibility Visualizer is supplementary.
20+
Although errors and warnings are displayed for clearly problematic parts, the problems that can be detected mechanically are limited, and whether the displayed names (labels), heading levels, and so on are appropriate must be judged by the person looking at the display.
21+
22+
Furthermore, checks using Accessibility Visualizer do not completely eliminate the need for verification with actual assistive technologies such as screen readers.
23+
For checks that need to be performed with a screen reader, conduct verification with NVDA as described in :ref:`exp-screen-reader-check-nvda`.
24+
25+
On the other hand, the advantage of Accessibility Visualizer is that it allows you to easily check things like the presence of alternative text and labels, and the structure of the page, on screen, even if you are not proficient in operating a screen reader.
26+
Incorporating it into checks during development makes it easier to discover problems at an early stage.
27+
It is a good idea to use it in combination with other checking tools such as :ref:`exp-axe`, and with verification using screen readers.
28+
29+
***********
30+
Preparation
31+
***********
32+
33+
Installation
34+
============
35+
36+
Accessibility Visualizer can be installed from the Chrome Web Store for Google Chrome, and from Firefox Add-Ons for Mozilla Firefox.
37+
38+
* `Accessibility Visualizer - Chrome Web Store <https://chromewebstore.google.com/detail/accessibility-visualizer/idcacekakoknnpbfjcdhnkffgfbddnhk>`__
39+
* `Accessibility Visualizer – Get this Extension for Firefox <https://addons.mozilla.org/en-US/firefox/addon/accessibility-visualizer/>`__
40+
41+
After installation, an Accessibility Visualizer item will appear in the browser's extension menu.
42+
If you use it frequently, we recommend pinning it to the browser's toolbar.
43+
When pinned to the toolbar, the Accessibility Visualizer icon will always be displayed.
44+
45+
Displaying the Popup
46+
====================
47+
48+
Clicking the Accessibility Visualizer item in the extension menu, or the Accessibility Visualizer icon pinned to the toolbar, opens the Accessibility Visualizer popup.
49+
In this popup, you configure settings such as selecting which information to display.
50+
51+
There is an "Enabled" checkbox in the popup.
52+
If you uncheck it, no information will be displayed on Web pages.
53+
54+
Note that settings are saved per domain, so you can maintain display settings suited to each site.
55+
56+
***********
57+
Basic Usage
58+
***********
59+
60+
Displaying Tips
61+
===============
62+
63+
When you check the "Show tips" checkbox in the popup, various pieces of information will be displayed on the Web page you are viewing as small labels called "tips."
64+
65+
There are several types of tips, distinguished by color and icon. The following three types are particularly important when performing checks:
66+
67+
Name
68+
Displayed in green with a person icon.
69+
It shows the element's "accessible name," that is, the content conveyed to assistive technologies such as screen readers as the alternative text of an image, the label of a form control, or the text of a link or button.
70+
Warning
71+
Displayed in yellow with a warning triangle icon.
72+
It indicates a part that may have a problem and should be checked carefully.
73+
Error
74+
Displayed in red with an error triangle icon.
75+
It indicates a part that definitely has a problem and requires correction.
76+
77+
In addition, there are tips that indicate heading levels, landmark types, table sizes and cell positions, the number of list items, languages, roles, WAI-ARIA attributes, and more.
78+
79+
When you check the "Interactive" checkbox, tips will appear subdued until you mouse over them.
80+
This is useful when many tips are displayed and the page becomes hard to see.
81+
82+
The display positions of tips may sometimes shift.
83+
In such cases, press the "Re-run" button in the popup.
84+
85+
Presets
86+
=======
87+
88+
The targets for which tips are displayed can be selected individually with the checkboxes in the popup, or easily switched using the preset feature.
89+
90+
* **Basic**: Displays headings, images, form controls, buttons, links, page, language, and WAI-ARIA information
91+
* **Structure**: Displays headings, sections, page, and language information
92+
* **Content**: Displays images, links, tables, and lists
93+
* **Custom**: Freely select which information to display
94+
95+
Live Region Announcements
96+
=========================
97+
98+
When "Announce live regions" is checked in the popup, changes to the content of ARIA live regions will be displayed prominently near the center of the screen.
99+
100+
ARIA live regions are used to convey changes in the state of the screen to users of assistive technologies such as screen readers (see :ref:`exp-dynamic-content-status`).
101+
Using this feature, you can verify that notifications by live regions occur as intended, without using a screen reader.
102+
103+
While announcements are displayed, the following key operations are available:
104+
105+
:kbd:`Shift`
106+
Toggle pause/resume
107+
:kbd:`Ctrl`
108+
Clear the displayed announcements
109+
110+
Display Customization
111+
=====================
112+
113+
How tips and live region announcements are displayed can be customized in the popup settings.
114+
You can adjust the opacity and font size of tips, as well as the opacity, font size, and display duration of live region announcements, so it is a good idea to adjust these settings to make them easy to see on the page you are checking.
115+
116+
*******************************
117+
How to Use It for Checks
118+
*******************************
119+
120+
This section explains the points to check in accessibility checks, for each type of information displayed as tips.
121+
122+
Images
123+
======
124+
125+
When "Images" is checked, tips are displayed for ``img`` elements, ``svg`` elements, and elements with the ``role="img"`` attribute.
126+
127+
* Name tips display the alternative text of images.
128+
Check that it is a concise description that conveys almost the same information even if displayed in place of the image. (See :ref:`exp-image-text-alternative`)
129+
* For ``img`` elements with ``alt=""``, an "Empty alt attribute" warning tip is displayed.
130+
Images in this state cannot be perceived by assistive technologies such as screen readers.
131+
Unless the image is placed for decorative purposes, alternative text must be provided.
132+
* If no alternative text is specified and the element is not ``aria-hidden`` and does not have ``alt=""``, a "No alt attribute" or "No accessible name" error tip is displayed.
133+
In this case, correction is required.
134+
135+
Headings
136+
========
137+
138+
When "Headings" is checked, tips are displayed for ``h1`` through ``h6`` elements and elements with the ``role="heading"`` attribute.
139+
140+
* "Heading" tips display the level of the heading.
141+
Check that the level is appropriate for the structure of the page. (See :ref:`exp-page-structure`)
142+
* For elements with the ``role="heading"`` attribute but without the ``aria-level`` attribute, a warning tip "No heading level" is displayed.
143+
Explicitly specifying the ``aria-level`` attribute is recommended.
144+
* If no name is given to a heading, a "No accessible name" error tip is displayed.
145+
In this case, correction is required.
146+
147+
Form Controls
148+
=============
149+
150+
When "Form Controls" is checked, tips are displayed for ``input`` elements (excluding those whose ``type`` attribute is ``hidden``, ``button``, ``submit``, ``reset``, or ``image``), ``textarea`` elements, ``select`` elements, ``label`` elements, ``fieldset`` elements, and elements whose ``role`` attribute is one of ``textbox``, ``combobox``, ``checkbox``, ``radio``, ``switch``, ``menuitemcheckbox``, or ``menuitemradio``.
151+
152+
* Name tips display the labels of form controls.
153+
Check for omissions and that the labels are appropriate. (See :ref:`exp-form-labeling`)
154+
* If no name is given, a "No accessible name" error tip is displayed.
155+
In this case, correction is required.
156+
* For elements that are not focusable by default and have no ``tabindex`` attribute specified, a "Not focusable" error tip is displayed.
157+
In this state, keyboard operation is not possible, so correction is required.
158+
* If there is a problem with the grouping of radio buttons, error tips such as "No name attribute" or "Ungrouped radio button" are displayed.
159+
In this state, selection with the keyboard does not work correctly, so correction is required.
160+
* For ``label`` elements whose associated form control does not exist or is hidden, a "Not associated with any control" warning tip is displayed.
161+
Especially when the control is hidden with ``display:none`` or similar techniques in order to style checkboxes or radio buttons, there is a high possibility that it cannot be operated with the keyboard, so verification is required.
162+
163+
Buttons and Links
164+
=================
165+
166+
When "Buttons" is checked, tips are displayed for ``button`` elements, ``input`` elements whose ``type`` attribute is one of ``button``, ``submit``, ``reset``, or ``image``, and elements with the ``role="button"`` attribute.
167+
When "Links" is checked, tips are displayed for ``a`` elements, ``area`` elements, and elements with the ``role="link"`` attribute.
168+
169+
* Name tips display the labels of buttons and the text of links.
170+
Check that the content allows users to predict the behavior or the link destination just by reading it. (See :ref:`exp-link-text`)
171+
* If no name is given, a "No accessible name" error tip is displayed.
172+
In this case, correction is required.
173+
* For elements with the ``role="button"`` attribute that are not focusable by default and have no ``tabindex`` attribute specified, a "Not focusable" error tip is displayed.
174+
In this state, keyboard operation is not possible, so correction is required.
175+
* For ``a`` or ``area`` elements without the ``href`` attribute, a warning tip "No href attribute" is displayed.
176+
If click interactions are set on elements in this state, they may not be operable with the keyboard, or users of assistive technologies may not be able to recognize them as interactive targets, so correction is required.
177+
178+
Sections
179+
========
180+
181+
When "Sections" is checked, tips are displayed for ``article``, ``section``, ``nav``, ``aside``, ``main``, ``form``, and ``search`` elements, and for elements whose ``role`` attribute is one of ``article``, ``banner``, ``complementary``, ``contentinfo``, ``main``, ``form``, ``navigation``, ``region``, ``search``, or ``application``.
182+
183+
These elements are used to divide the content of a page into sections, and help users of assistive technologies understand the structure of the page and skip unwanted content. (See :ref:`exp-page-structure`)
184+
185+
* Landmark tips display the type of the landmark.
186+
Check that the role is appropriate.
187+
* If an accessible name is given, name tips display the name of the section.
188+
Check that the name is appropriate, and that no landmarks with the same name and the same role exist on the page.
189+
190+
Tables
191+
======
192+
193+
When "Tables" is checked, tips are displayed for ``table`` elements and related elements.
194+
195+
* "Table size" tips display the number of rows and columns of the table, and "Position" tips display the position of each cell.
196+
* "Table header" tips display the content of the table headers (``th`` elements) corresponding to each cell.
197+
Especially for complex tables, check that headers and cells are properly associated.
198+
199+
Lists
200+
=====
201+
202+
When "Lists" is checked, tips are displayed for ``ul``, ``ol``, and ``dl`` elements and their list items.
203+
204+
* The type of the list and the number of items are displayed.
205+
Check that content that should be expressed as a list is marked up appropriately.
206+
207+
Language
208+
========
209+
210+
When "Language" is checked, tips are displayed for elements with the ``lang`` attribute.
211+
212+
* You can check the language setting of the entire page (the ``lang`` attribute of the ``html`` element) and the specifications for parts where the language changes.
213+
Check that the language is set appropriately.
214+
Language specification is important for screen readers to read content aloud with the correct pronunciation. (See :ref:`exp-text-lang`)
215+
216+
WAI-ARIA
217+
========
218+
219+
When "WAI-ARIA" is checked, tips are displayed for elements with WAI-ARIA attributes.
220+
221+
* WAI-ARIA attribute tips display the names and values of the attributes applied to elements.
222+
Check that attributes such as ``aria-expanded`` and ``aria-selected`` are set appropriately and change as expected in response to operations.
223+
* Warning tips are displayed for elements with the ``aria-hidden="true"`` attribute.
224+
Elements with this attribute cannot be perceived by users of assistive technologies such as screen readers.
225+
If there are elements other than decorative ones that are visually visible but have ``aria-hidden``, correction is required.
226+
227+
Live Regions
228+
============
229+
230+
Using the "Live Region Announcements" feature described above, you can check the following points about dynamically changing content:
231+
232+
* Dynamic changes such as status messages are announced by ARIA live regions
233+
* No unintended content is announced, and announcements do not occur too frequently
234+
235+
***********
236+
Usage Notes
237+
***********
238+
239+
* The display positions of tips may sometimes shift. In such cases, press the "Re-run" button in the popup
240+
* Some Web sites may become slow when tips or announcements are displayed. When viewing such sites, uncheck "Show tips" and "Announce live regions"
241+
* In parts that use frames or Shadow DOM, tips and live regions may not be displayed due to technical constraints
242+
* Interactive mode may interfere with mouse operations on Web pages
243+
* To reiterate, checks with Accessibility Visualizer are not a substitute for verification with actual assistive technologies such as screen readers. See also :ref:`exp-screen-reader-check`
244+
245+
*********************
246+
Reference Information
247+
*********************
248+
249+
* `Accessibility Visualizer User's Guide <https://github.com/ymrl/a11y-visualizer/blob/main/docs/en/UsersGuide.md>`__

en/source/explanations/check-tools.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Tools for Checking Accessibility
1010
check-contrast
1111
screen-reader-check
1212
axe
13+
a11y-visualizer

0 commit comments

Comments
 (0)