diff --git a/LICENSE.md b/LICENSE.md
index 0f7c218c64..982d931424 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,3 @@
All documents in this Repository are licensed by contributors
under the
[W3C Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software).
-
diff --git a/aria-practices-DeletedSectionsArchive.html b/aria-practices-DeletedSectionsArchive.html
index f8ffc66206..386db1d2e4 100644
--- a/aria-practices-DeletedSectionsArchive.html
+++ b/aria-practices-DeletedSectionsArchive.html
@@ -1,162 +1,162 @@
- The current month has a label representing the month and year.
- It is advisable to use a role heading but is not essential.
- This "label" should have a unique ID.
-
-
If the author would like to ensure that a label is announced by a screen reader, as the label changes, include live region properties with the label element: aria-live="assertive" and aria-atomic="true".
-
The container for the day of week headers and numeric days of the week has a role of grid.
-
The grid has an aria-labelledby property with a value equivalent to the id of the label for the grid.
-
Each name for the day of the week has a role columnheader and is not navigable via the keyboard.
-
Each numeric day of the week has the role gridcell.
-
When a day is selected its aria-selected is set to true, otherwise it is set to false or removed.
-
Changes in aria states, identified here, as well as focus, are clearly styled to show the user where their point of regard is and what days are selected.
+
+ The current month has a label representing the month and year.
+ It is advisable to use a role heading but is not essential.
+ This "label" should have a unique ID.
+
+
If the author would like to ensure that a label is announced by a screen reader, as the label changes, include live region properties with the label element: aria-live="assertive" and aria-atomic="true".
+
The container for the day of week headers and numeric days of the week has a role of grid.
+
The grid has an aria-labelledby property with a value equivalent to the id of the label for the grid.
+
Each name for the day of the week has a role columnheader and is not navigable via the keyboard.
+
Each numeric day of the week has the role gridcell.
+
When a day is selected its aria-selected is set to true, otherwise it is set to false or removed.
+
Changes in aria states, identified here, as well as focus, are clearly styled to show the user where their point of regard is and what days are selected.
When the date picker is active a calendar day of the week always has focus.
@@ -1213,11 +1213,11 @@
General Steps for Building an Accessible Widget with WAI-ARIA
onfocus="showFocus();"
>
<img src="img/btn1.gif" title="Home" alt="Home" role="button" id="button1"
- onclick="updateText('Home was invoked');">
+ onclick="updateText('Home was invoked');">
<img src="img/btn2.gif" title="Refresh" alt="Refresh" role="button" id="button2"
- onclick="updateText('Refresh was invoked');">
+ onclick="updateText('Refresh was invoked');">
<img src="img/btn3.gif" title="Help" alt="Help" role="button" id="button3"
- onclick="updateText('Help was invoked');">
+ onclick="updateText('Help was invoked');">
</div>
By setting tabindex=0 on the toolbar, the toolbar will receive focus in the document order. It is necessary then to use script and the aria-activedescendant property to manage virtual focus among the buttons. The details are given in step five, below.
@@ -1261,28 +1261,28 @@
General Steps for Building an Accessible Widget with WAI-ARIA
// Partial sample code for processing arrow keys
if (event.type == "keydown") {
- if (event.altKey) {
- return true; // Browser should use this, the menu view doesn't need alt-modified keys
- }
- // XXX Implement circular keyboard navigation within the toolbar buttons
-
- if (event.keyCode == DOM_VK_ENTER) {
- ExecuteButtonAction(getCurrentButtonID()); // This is an author defined function
- }
- else if (event.keyCode == event.DOM_VK_RIGHT) {
- // Change the active toolbar button to the one to the right (circular) by
- var buttonid = getNextButtonID(); // This is an author defined function
- tb.setAttribute("aria-activedescendant", buttonid);
- }
- else if (event.keyCode == event.DOM_VK_LEFT) {
+ if (event.altKey) {
+ return true; // Browser should use this, the menu view doesn't need alt-modified keys
+ }
+ // XXX Implement circular keyboard navigation within the toolbar buttons
+
+ if (event.keyCode == DOM_VK_ENTER) {
+ ExecuteButtonAction(getCurrentButtonID()); // This is an author defined function
+ }
+ else if (event.keyCode == event.DOM_VK_RIGHT) {
+ // Change the active toolbar button to the one to the right (circular) by
+ var buttonid = getNextButtonID(); // This is an author defined function
+ tb.setAttribute("aria-activedescendant", buttonid);
+ }
+ else if (event.keyCode == event.DOM_VK_LEFT) {
// Change the active toolbar button to the one to the left (circular) by
var buttonid = getPrevButtonID(); // This is an author defined function
tb.setAttribute("aria-activedescendant", buttonid);
- }
- else {
+ }
+ else {
return true;
- }
- return false;
+ }
+ return false;
}
else if (event.type == "keypress") {
…
@@ -1314,9 +1314,9 @@
General Steps for Building an Accessible Widget with WAI-ARIA
Authors should be aware that CSS attribute selectors are not supported in some browsers, such as Internet Explorer 6. A consistent way to apply styling to reflect WAI-ARIA semantics would be to assign an element a class name based on the WAI-ARIA attribute being set using script as shown here:
function setSelectedOption(menuItem)
- {
+ {
if (menuItem.getAttribute("role") != "menuitem") {
- return;
+ return;
}
var menu = getMenu(menuItem);
var oldMenuItem = getSelectedOption(menu);
@@ -1372,11 +1372,11 @@
General Steps for Building an Accessible Widget with WAI-ARIA
Support basic accessibility, such as alternative text on images
When an image is used to represent information within a component, such as image buttons, you need to set the alternative text on those images. This is then mapped by the user agent to the accessible name in the platform accessibility API. Using our example:
- If you have a regional landmark of type application and static descriptive text is available, then on the application landmark, include an aria-describedby reference to associate the application and the static text as shown here:
+ If you have a regional landmark of type application and static descriptive text is available, then on the application landmark, include an aria-describedby reference to associate the application and the static text as shown here:
<div role="application" aria-labelledby="calendar" aria-describedby="info">
<h1 id="calendar">Calendar<h1>
<p id="info">
This calendar shows the game schedule for the Boston Red Sox.
@@ -1537,7 +1537,7 @@
Steps for Defining a Logical Navigational Structure
<div role="grid">
…
</div>
-
+
For landmarks unsuited to specialized region WAI-ARIA roles
You can create custom regional landmarks by using a generic region. While it is not essential to label these specialized regions with a header, you should provide a title to ensure that the region name is accessible to all users, just as you would the standard regional landmarks. See Header levels versus Nesting levels for directions on how to label the region.
Using ARIA:
<div role="main" aria-labelledby="page_title">
<p id="page_title" role="heading" aria-level="1">Top News Stories</p>
- … main page contents here …
+ … main page contents here …
</div>
Using native markup:
<div role="main" aria-labelledby="page_title">
<h1 id="page_title">Top News Stories</h1>
- … main page contents here …
+ … main page contents here …
</div>
@@ -1629,27 +1629,27 @@
Directories, Groups, and Regions
Directories and Their Applicability
The WAI-ARIA role, directory, allows authors to mark static table of content sections of a document. Prior to WAI-ARIA, the user would need to guess if an area of a document actually pertained to the table of contents. Authors should mark these sections within a document with a role of directory.
Unlike table cells within a table, authors should ensure a grid's gridcells are focusable through the use of tabindex (in HTML), or aria-activedescendant on the grid.They may also be editable, as is shown in the above example.
Treegrid's may require expanding and collapsing rows which may not be performed using a <tr>. In these instances authors will use an HTML <div>. WAI-ARIA provides a role of row which may be assigned to the <div> to convey to the assistive technology that this is still a row. If you decide to not use the native HTML <table> elements and choose more flexible elements, such as <div> and <span>s, with applied WAI-ARIA roles in this section, you should structurally lay out your elements in line with what you would expect from HTML. All of your rowheaders should be in a row and your gridcells should be children of each subsequent row in the same format as HTML for <td>s and <th>s within <tr>s.
@@ -1722,7 +1722,7 @@
Marking Descriptive Sections
<img src="foo" alt="abbreviated name" aria-describedby="prose1">
<div id="prose1">
- The prose in this div describes the image foo in detail.
+ The prose in this div describes the image foo in detail.
</div>
This is the preferred vehicle for providing long descriptions for elements in your document.
When the author does not desire the entire descriptive text to be located on the main page, aria-describedby can also be used to point to a link to another page.
@@ -1764,12 +1764,12 @@
Miscellaneous XHTML Section Roles
</dl>
The note role defines a parenthetic or ancillary remark to the main content of the resource. It also allows assistive technologies to skip over this section of the document unless more information is requested about the main content.
<div role="main" aria-labelledby="foo">
- <h1 id="foo">Wild fires spread across the San Diego Hills</h1>
- Strong winds expand fires ignited by high temperatures …
+ <h1 id="foo">Wild fires spread across the San Diego Hills</h1>
+ Strong winds expand fires ignited by high temperatures …
</div>
<div role="note">
- This article was last updated July 30, 2008 at 6:05PM.
+ This article was last updated July 30, 2008 at 6:05PM.
</div>
Marked up content or widgets will often need additional context to make clear what the meaning or purpose is. It is also reasonable that some content media types will need additional descriptions in another format to give clarity to those who are unable to consume the origin format. These additional meta-content sections are linked together by tagging them as labels or descriptions. WAI-ARIA provides the aria-labelledby and aria-describedby attributes to signal the browser to feed these relationships into the accessibility layer. This layer is then used by screen readers and other accessibility technology (AT) to gain awareness of how disparate regions are actually contextually connected to each other. With this awareness the AT can then present a meaningful navigation model for discovery and presentation of these additional content sections. The user agent itself can also choose to present these insights in a meaningful way. Generally you should always add these attributes to any widgets on your site as they are often merely a construct of HTML and JavaScript which provides no obvious insight as to what the widget's behavior or interactivity is.
Labeling
- When using one element to label another use the aria-labelledby by attribute. A label should provide the user with the essence of what the object does. For example, you could have a dialog box erected from HTML <div> and you need to associate a label for the dialog. With a WAI-ARIA role of dialog, you can indicate its widget type and define a label using an HTML header and then associate that label with the dialog using the aria-labelledby relationship.
-
+ When using one element to label another use the aria-labelledby by attribute. A label should provide the user with the essence of what the object does. For example, you could have a dialog box erected from HTML <div> and you need to associate a label for the dialog. With a WAI-ARIA role of dialog, you can indicate its widget type and define a label using an HTML header and then associate that label with the dialog using the aria-labelledby relationship.
+
The aria-describedby property is not designed to reference descriptions on an external resource—since it is an IDREF, it must reference an element in the same DOM document. This is different from the HTML longdesc attribute, which accepts any URI. In general, the preferred pattern for WAI-ARIA applications is to include all relevant resources in the same DOM, But if you wish to reference an external resource with aria-describedby, you can reference a link that in turn references the external resource. This requires the user to follow two steps, first following the aria-describedby arc, then following the link, but does address the use case. The following example demonstrates this:
<p>
- <img
- src="images/histogram.png"
- alt="Histogram of Blackberry tree heights"
- width="40%"
- aria-describedby="longdesc1"
- />
+ <img
+ src="images/histogram.png"
+ alt="Histogram of Blackberry tree heights"
+ width="40%"
+ aria-describedby="longdesc1"
+ />
</p>
<p>
@@ -2450,9 +2450,9 @@
live region - If you have some other live area use case, WAI-ARIA allows you to mark an area using the aria-live attribute. This, accompanied by the collection of attributes which support the live property, allows you to create your own custom live area on your Web page. For more details regarding live regions refer to the live region section of this guide.
- Auto-Rotating Image Carousel Example: A basic image carousel that demonstrates the accessibility features necessary for carousels that rotate automatically on page load.
+ Auto-Rotating Image Carousel Example: A basic image carousel that demonstrates the accessibility features necessary for carousels that rotate automatically on page load.
-
+
Terms
The following terms are used to describe components of a carousel.
@@ -578,7 +578,7 @@
Basic carousel elements
The rotation control has an accessible label provided by either its inner text or aria-label.
The label changes to match the action the button will perform, e.g., "Stop slide rotation" or "Start slide rotation".
- A label that changes when the button is activated clearly communicates both that slide content can change automatically and when it is doing so.
+ A label that changes when the button is activated clearly communicates both that slide content can change automatically and when it is doing so.
Note that since the label changes, the rotation control does not have any states, e.g., aria-pressed, specified.
List autocomplete with automatic selection: When the popup is triggered, it presents suggested values that complete or logically correspond to the characters typed in the textbox,
and the first suggestion is automatically highlighted as selected.
- The automatically selected suggestion becomes the value of the textbox when the combobox loses focus unless the user chooses a different suggestion or changes the character string in the textbox.
+ The automatically selected suggestion becomes the value of the textbox when the combobox loses focus unless the user chooses a different suggestion or changes the character string in the textbox.
List with inline autocomplete: This is the same as list with automatic selection with one additional feature.
@@ -951,14 +951,14 @@
Tree Popup Keyboard Interaction
When focus is on a open node, moves focus to the first child node and selects it if it is selectable.
When focus is on an end node, does nothing.
-
+
Left arrow:
When focus is on an open node, closes the node.
When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node and selects it if it is selectable.
When focus is on a root node that is also either an end node or a closed node, does nothing.
-
+
Down Arrow: Moves focus to the next node that is focusable without opening or closing a node and selects it if it is selectable.
Up Arrow: Moves focus to the previous node that is focusable without opening or closing a node and selects it if it is selectable.
Home: Moves focus to the first node in the tree without opening or closing a node and selects it if it is selectable.
@@ -1264,8 +1264,8 @@
Feed
For example, a product page on a shopping site may have a related products section that displays five products at a time.
As the user scrolls, more products are requested and loaded into the DOM.
- While a static design might include a next button for loading five more products, a dynamic implementation that automatically loads more data as the user scrolls simplifies the user experience and reduces the inertia associated with viewing more than the first five product suggestions.
- But, unfortunately when web pages load content dynamically based on scroll events, it can cause usability and interoperability difficulties for users of assistive technologies.
+ While a static design might include a next button for loading five more products, a dynamic implementation that automatically loads more data as the user scrolls simplifies the user experience and reduces the inertia associated with viewing more than the first five product suggestions.
+ But, unfortunately when web pages load content dynamically based on scroll events, it can cause usability and interoperability difficulties for users of assistive technologies.
The feed pattern enables reliable assistive technology reading mode interaction by establishing the following interoperability agreement between the web page and assistive technologies:
@@ -1327,7 +1327,7 @@
Keyboard Interaction
Users move focus into the nested feed from the content of the containing article with Tab.
This may be slow if the article contains a significant number of links, buttons, or other widgets.
-
+
Provide a key for moving focus from the elements in the containing article to the first item in the nested feed, e.g., Alt + Page Down.
To continue reading the outer feed, Control + End moves focus to the next article in the outer feed.
@@ -1732,7 +1732,7 @@
Link
A link widget provides an interactive reference to a resource.
The target resource can be either external or local, i.e., either outside or within the current page or application.
-
+
Authors are strongly encouraged to use a native host language link element, such as an HTML
<A> element with an href attribute. As with other WAI-ARIA
@@ -1819,8 +1819,8 @@
Keyboard Interaction
Down Arrow: Moves focus to the next option. Optionally, in a single-select listbox, selection may also move with focus.
Up Arrow: Moves focus to the previous option. Optionally, in a single-select listbox, selection may also move with focus.
-
Home (Optional): Moves focus to first option. Optionally, in a single-select listbox, selection may also move with focus. Supporting this key is strongly recommended for lists with more than five options.
-
End (Optional): Moves focus to last option. Optionally, in a single-select listbox, selection may also move with focus. Supporting this key is strongly recommended for lists with more than five options.
+
Home (Optional): Moves focus to first option. Optionally, in a single-select listbox, selection may also move with focus. Supporting this key is strongly recommended for lists with more than five options.
+
End (Optional): Moves focus to last option. Optionally, in a single-select listbox, selection may also move with focus. Supporting this key is strongly recommended for lists with more than five options.
Type-ahead is recommended for all listboxes, especially those with more than seven options:
Type a character: focus moves to the next item with a name that starts with the typed character.
@@ -2179,7 +2179,7 @@
For Radio Groups Not Contained in a Toolbar
Tab and Shift + Tab:
- Move focus into and out of the radio group.
+ Move focus into and out of the radio group.
When focus moves into a radio group :
If a radio button is checked, focus is set on the checked button.
@@ -2618,7 +2618,7 @@
Keyboard Interaction
sets focus on the tab following the tab that was closed, and optionally activates the newly focused tab. If there is not a tab that followed the tab that was deleted,
e.g., the deleted tab was the right-most tab in a left-to-right horizontal tab list,
sets focus on and optionally activates the tab that preceded the deleted tab.
- If the application allows all tabs to be deleted, and the user deletes the last remaining tab in the tab list,
+ If the application allows all tabs to be deleted, and the user deletes the last remaining tab in the tab list,
the application moves focus to another element that provides a logical work flow.
As an alternative to Delete, or in addition to supporting Delete, the delete function is available in a context menu.
@@ -2861,14 +2861,14 @@
Keyboard Interaction
When focus is on a open node, moves focus to the first child node.
When focus is on an end node, does nothing.
-
+
Left arrow:
When focus is on an open node, closes the node.
When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.
When focus is on a root node that is also either an end node or a closed node, does nothing.
-
+
Down Arrow: Moves focus to the next node that is focusable without opening or closing a node.
Up Arrow: Moves focus to the previous node that is focusable without opening or closing a node.
Home: Moves focus to the first node in the tree without opening or closing a node.
@@ -3061,35 +3061,35 @@
Keyboard Interaction
Page Up:
-
+
If focus is on a row, moves focus up an author-determined number of rows, typically scrolling so the top row in the currently visible set of rows becomes one of the last visible rows. If focus is in the first row, focus does not move.
If focus is on a cell, moves focus up an author-determined number of cells, typically scrolling so the top row in the currently visible set of rows becomes one of the last visible rows. If focus is in the first row, focus does not move.
Home:
-
+
If focus is on a row, moves focus to the first row. If focus is in the first row, focus does not move.
If focus is on a cell, moves focus to the first cell in the row. If focus is in the first cell of the row, focus does not move.
End:
-
+
If focus is on a row, moves focus to the last row. If focus is in the last row, focus does not move.
If focus is on a cell, moves focus to the last cell in the row. If focus is in the last cell of the row, focus does not move.
Control + Home:
-
+
If focus is on a row, moves focus to the first row. If focus is in the first row, focus does not move.
If focus is on a cell, moves focus to the first cell in the column. If focus is in the first row, focus does not move.
Control + End:
-
+
If focus is on a row, moves focus to the last row. If focus is in the last row, focus does not move.
If focus is on a cell, moves focus to the last cell in the column. If focus is in the last row, focus does not move.
@@ -3211,7 +3211,7 @@
WAI-ARIA Roles, States, and Properties
-
+
Window Splitter
@@ -4204,7 +4204,7 @@
Choose Appropriate Shortcut Behavior
Activate an element without moving focus when the target context of the function is the context that contains the focus. This behavior is most common for command buttons and for functions associated with elements that are not visible, such as a "Save" option that is accessible via a menu. For example, if the focus is on an option in a listbox and a toolbar contains buttons for moving and removing options, it is most beneficial to keep focus in the listbox when the user presses a key shortcut for one of the buttons in the toolbar. This behavior can be particularly important for screen reader users because it provides confirmation of the action performed and makes performing multiple commands more efficient. For instance, when a screen reader user presses the shortcut for the "Up" button, the user will be able to hear the new position of the option in the list since it still has the focus. Similarly, when the user presses the shortcut for deleting an option, the user can
- hear the next option in the list and immediately decide whether to press the delete shortcut again.
+ hear the next option in the list and immediately decide whether to press the delete shortcut again.
Move focus and activate when the target of the shortcut has a single function and the context of that function is the same as the target.
@@ -4549,7 +4549,7 @@
Using aria-colindex When Column Indicies Are Contiguous
Each accordion header element contains a button that controls the visibility of its content panel.
-
The example uses heading level 3 so it fits correctly within the outline of the page; the example is contained in a section titled with a level 2 heading.
+
The example uses heading level 3 so it fits correctly within the outline of the page; the example is contained in a section titled with a level 2 heading.
diff --git a/examples/accordion/js/accordion.js b/examples/accordion/js/accordion.js
index 8d0b354ed0..0cc19ec4ae 100644
--- a/examples/accordion/js/accordion.js
+++ b/examples/accordion/js/accordion.js
@@ -1,9 +1,9 @@
/*
-* This content is licensed according to the W3C Software License at
-* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
-*
-* Simple accordion pattern example
-*/
+ * This content is licensed according to the W3C Software License at
+ * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
+ *
+ * Simple accordion pattern example
+ */
'use strict';
diff --git a/examples/alert/alert.html b/examples/alert/alert.html
index f061fefc87..d59f5e2fb1 100644
--- a/examples/alert/alert.html
+++ b/examples/alert/alert.html
@@ -23,7 +23,7 @@
diff --git a/examples/alert/js/alert.js b/examples/alert/js/alert.js
index 4c26b140b2..838c8617aa 100644
--- a/examples/alert/js/alert.js
+++ b/examples/alert/js/alert.js
@@ -1,8 +1,8 @@
/*
-* This content is licensed according to the W3C Software License at
-* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
-*
-*/
+ * This content is licensed according to the W3C Software License at
+ * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
+ *
+ */
window.addEventListener('load', function () {
var button = document.getElementById('alert-trigger');
@@ -12,13 +12,13 @@ window.addEventListener('load', function () {
});
/*
-* @function addAlert
-*
-* @desc Adds an alert to the page
-*
-* @param {Object} event - Standard W3C event object
-*
-*/
+ * @function addAlert
+ *
+ * @desc Adds an alert to the page
+ *
+ * @param {Object} event - Standard W3C event object
+ *
+ */
function addAlert (event) {
diff --git a/examples/button/js/button.js b/examples/button/js/button.js
index 1c55e39057..2f77ec742b 100644
--- a/examples/button/js/button.js
+++ b/examples/button/js/button.js
@@ -1,9 +1,9 @@
/*
-* This content is licensed according to the W3C Software License at
-* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
-*
-* JS code for the button design pattern
-*/
+ * This content is licensed according to the W3C Software License at
+ * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
+ *
+ * JS code for the button design pattern
+ */
var ICON_MUTE_URL = 'images/mute.svg#icon-mute';
var ICON_SOUND_URL = 'images/mute.svg#icon-sound';
diff --git a/examples/carousel/carousel-1/carousel-1.html b/examples/carousel/carousel-1/carousel-1.html
index f2982a05dc..0f9c37bf1e 100644
--- a/examples/carousel/carousel-1/carousel-1.html
+++ b/examples/carousel/carousel-1/carousel-1.html
@@ -53,10 +53,10 @@