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

Add redesigned toolbar example #950

Merged
merged 117 commits into from
Jan 15, 2019
Merged
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
9e304a1
update button example
jongund Mar 18, 2017
4e59e79
fixed references to external file
jongund Mar 27, 2017
76ff0ed
added auto rebase
jongund Mar 27, 2017
75a87f2
Merge branch 'master' of https://github.com/jongund/aria-practices
jongund May 24, 2018
14923a1
icon change
jinzhou77 Jun 25, 2018
0df77d2
removed gitcongif file
jongund Jun 27, 2018
4eb38fb
some update
jinzhou77 Jun 27, 2018
03251ff
unfinishied toolbar
jinzhou77 Jun 28, 2018
51539b4
toolbar example updated
jinzhou77 Jul 5, 2018
d783f3d
some style updated
jinzhou77 Jul 5, 2018
d495d91
some style updated
jinzhou77 Jul 5, 2018
9198427
style updated
jinzhou77 Jul 5, 2018
43fd251
npm test pass
jinzhou77 Jul 5, 2018
42d7cef
modified keyboard support
jinzhou77 Jul 9, 2018
4be0a55
some changes of tabindex
jinzhou77 Jul 9, 2018
941cf01
style change
jinzhou77 Jul 10, 2018
40ab3ff
updated toolbar styling
jongund Jul 10, 2018
6a00ca5
updated event handlers
jongund Jul 10, 2018
6ade7a2
style changed and aria-pressed removed for menubutton
jinzhou77 Jul 11, 2018
8573e64
style updated
jinzhou77 Aug 20, 2018
7a4c4d7
updated docs
jinzhou77 Aug 20, 2018
9c65385
updated the docs
jinzhou77 Aug 21, 2018
9e34e26
style updated
jinzhou77 Aug 21, 2018
8e1dfd5
style updated
jinzhou77 Aug 21, 2018
4ec9f89
border color
jinzhou77 Aug 21, 2018
4b8dca1
color
jinzhou77 Aug 21, 2018
35b07ae
updated style
jinzhou77 Aug 21, 2018
fdb1392
doc updated
jinzhou77 Aug 22, 2018
ebdd0fe
toolbar update
jinzhou77 Sep 6, 2018
5382b55
someupdate
jinzhou77 Sep 6, 2018
569f693
update
jinzhou77 Sep 13, 2018
5bc9718
use aria properties
jinzhou77 Sep 13, 2018
e0fea96
updated focus styling for aria-pressed
jongund Sep 13, 2018
722c961
fixed modified files
jongund Sep 16, 2018
a7a8d44
removed added git file
jongund Sep 16, 2018
b9094fd
added labels to buttons
jongund Sep 16, 2018
cf7eccb
updated interaction logic
jongund Sep 17, 2018
e5f4626
updated interaction code
jongund Sep 17, 2018
bc69a20
updated interaction code
jongund Sep 17, 2018
925f65a
updated naming of files and objects
jongund Sep 17, 2018
6d457fa
updated menu button code
jongund Sep 17, 2018
e102e85
updated toolbar stling when menu has focus
jongund Sep 17, 2018
f30ff3b
fixed code style bugs
jongund Sep 17, 2018
dface40
fixed menu stlying bug
jongund Sep 17, 2018
24763b6
added link and spin button
jongund Sep 18, 2018
90d69c3
some updated/not finished
jinzhou77 Sep 20, 2018
e34d425
some update for copy cut/paste
jinzhou77 Sep 25, 2018
9f3105e
Merge remote-tracking branch 'w3c/master'
jongund Oct 1, 2018
de79fb1
updated
jongund Oct 1, 2018
08ceea5
restored toolbar.html
jongund Oct 2, 2018
1c1721a
updated
jinzhou77 Oct 4, 2018
1b29a1e
fixed bug with disabled controls
jongund Oct 4, 2018
f154702
updarted labels and descritpions for cut, copy and paste
jongund Oct 4, 2018
48f906b
some updated of textarea domNode
jinzhou77 Oct 4, 2018
499ff6e
updated reference to cut, copy and paste
jongund Oct 4, 2018
8a0e291
someupdated
jinzhou77 Oct 5, 2018
54a9026
added keyboard support for selected text to update the menu buttons a…
jongund Oct 5, 2018
ea70dcf
fixed validation bugs
jongund Oct 5, 2018
c05d0f4
Merge remote-tracking branch 'w3c/master'
jongund Oct 5, 2018
319ea79
Merge branch 'master' into toolbar
jongund Oct 5, 2018
864bfc2
added items to toolbar
jongund Oct 10, 2018
5d5d099
finished the nighMode spinButton & tips redirect
jinzhou77 Oct 15, 2018
c8e2738
fixing focus issues
jongund Oct 15, 2018
0274218
fixing focus issues
jongund Oct 15, 2018
f6ed47e
fixing focus issues
jongund Oct 15, 2018
67cfa8c
updated spinbutton
jongund Oct 15, 2018
3f22ee0
changed link button item
jongund Oct 15, 2018
cf9417a
fixed link issues
jongund Oct 15, 2018
72aa789
spinbutton styling issues
jongund Oct 15, 2018
30e8e13
fixed bug with font menu left and right keys
jongund Oct 15, 2018
56cd380
added aria-checked to pull down menus and updated menu css for menuit…
jongund Oct 16, 2018
8097f44
added visual indicator for selected font
jongund Oct 16, 2018
f0e1a68
Updated toolbar documentation
jongund Oct 17, 2018
1c124a8
update toolbar and documentation
jongund Nov 2, 2018
8f01bc0
fixed code formatting issues
jongund Nov 2, 2018
4bbb26a
fixed bug with night mode checkbox
jongund Nov 6, 2018
d93651a
updated toolbar
jongund Nov 9, 2018
51c2e1b
updated toolbar
jongund Nov 9, 2018
9a72721
updated toolbar
jongund Nov 9, 2018
218cee0
updated toolbar
jongund Nov 9, 2018
aa3b71c
updated toolbar
jongund Nov 9, 2018
1771496
updated toolbar
jongund Nov 9, 2018
d4a5795
udpated CSS
jongund Nov 12, 2018
a7ccf83
updated documentation on the menu button accessble name
jongund Nov 13, 2018
bf9aff6
add feature to align textare width with toolbar width
jongund Nov 14, 2018
7d4e962
removed right and left arrow keyboard support for font popup menu and…
jongund Nov 26, 2018
f14b087
added documentation on the left and right arrow keys doning nothing w…
jongund Nov 26, 2018
97e0b75
added hover effect for buttons, removed use of <i> elements and fixed…
jongund Dec 2, 2018
6f40bf3
added explaination to why menuitemradio is used for alignment buttons
jongund Dec 2, 2018
599d2de
Merge pull request #887 from jongund/toolbar
mcking65 Dec 3, 2018
1ca855d
updated css to improve contrast for selected buttons, changed alignme…
jongund Dec 5, 2018
cadd5aa
updated rdio group description
jongund Dec 5, 2018
9922918
fixed linting errors
jongund Dec 5, 2018
2afb160
updated regression test id
jongund Dec 5, 2018
0656c1d
updated documentation on thrid regression test
jongund Dec 5, 2018
b6f70d9
updated documentation for disabled buttons and fixed id issues
jongund Dec 6, 2018
929cb0c
added tabindex=-1 to spinbutton
jongund Dec 6, 2018
e967079
fixed validation bugs
jongund Dec 6, 2018
29d89d1
updated regression test file to mark as failing for roving tabindex
jongund Dec 6, 2018
3d0ea45
Merge branch 'master' into issue541-toolbar-redesign
jongund Dec 6, 2018
8e230cb
Merge branch 'master' into issue541-toolbar-redesign
mcking65 Dec 7, 2018
8dad82b
Updated
jongund Dec 7, 2018
84c9986
Merge branch 'issue541-toolbar-redesign' of https://github.com/w3c/ar…
jongund Dec 7, 2018
240bdb5
added tovingTabIndex test
jongund Dec 7, 2018
0a8ddf0
Merge branch 'master' into issue541-toolbar-redesign
mcking65 Dec 18, 2018
10df039
editorial revisions and data-test-id attribs up through radios
mcking65 Dec 19, 2018
68dca64
Finish edits of keyboard section
mcking65 Dec 19, 2018
ad98f19
Fix missing UL close
mcking65 Dec 19, 2018
2f16d88
updated copyright information
jongund Dec 19, 2018
3ff8e1a
updated copyright information
jongund Dec 19, 2018
3655b16
Editorial revisions for first half of states and props section
mcking65 Dec 20, 2018
93e52f8
Editorial revisions up through rps table 6
mcking65 Dec 20, 2018
b4b8de9
Complete final editorial revisions before starting final review process.
mcking65 Dec 20, 2018
12432bc
Add link to PR for review feedback.
mcking65 Dec 21, 2018
779bc97
Fix missing closing tag
mcking65 Dec 21, 2018
85a8288
Editorial revisions to radio group attributes
mcking65 Dec 21, 2018
493d092
Fixes for review and remove link to review issue.
mcking65 Jan 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finish edits of keyboard section
mcking65 committed Dec 19, 2018
commit 68dca64034b8cb716198404b6332cc7eb7e8b49c
160 changes: 68 additions & 92 deletions examples/toolbar/toolbar.html
Original file line number Diff line number Diff line change
@@ -231,7 +231,7 @@ <h3>Focus Styling</h3>
<h2 id="kbd_label">Keyboard Support</h2>
<section>
<h3 id="kbd_label_1">Toolbar</h3>
<p>The following keyboard commands, defined by the <a href="../../#toolbar">toolbar pattern</a>, apply to all controls in the toolbar.</p>
<p>The toolbar provides the following keyboard support defined by the <a href="../../#toolbar">toolbar pattern.</a></p>
<table aria-labelledby="kbd_label_1 kbd_label" class="def">
<thead>
<tr>
@@ -284,7 +284,7 @@ <h3 id="kbd_label_1">Toolbar</h3>

<section>
<h3 id="kbd_label_2">Toggle Buttons (Bold, Italic, Underline)</h3>
<p>The <b>Bold</b>, <i>Italic</i>, and <u>Underline</u> controls are toggle buttons that implement the <a href="../../#button">button design pattern</a>.</p>
<p>The toggle buttons for choosing to apply <b>Bold</b>, <i>Italic</i>, and <u>Underline</u> styling provide the following keyboard support defined by the <a href="../../#button">button design pattern</a>.</p>
<table aria-labelledby="kbd_label_2 kbd_label" class="def">
<thead>
<tr>
@@ -294,7 +294,7 @@ <h3 id="kbd_label_2">Toggle Buttons (Bold, Italic, Underline)</h3>
</thead>
<tbody>
<tr data-test-id="toolbar-toggle-enter-or-space">
<th><kbd>Enter</kbd>,<br><kbd>Space</kbd></th>
<th><kbd>Enter</kbd><br><kbd>Space</kbd></th>
<td>Toggle the pressed state of the button.</td>
</tr>
</tbody>
@@ -307,7 +307,7 @@ <h3 id="kbd_label_3">Radio Group (Text Alignment)</h3>
The buttons for choosing left, center, or right text alignment are styled like toggle buttons.
However, since pressing one toggles off another so that only one button in the group is in the pressed state, the toggles behave like radio buttons.
Because ARIA is designed to describe behavior, not styling, to assistive technologies,
the alignment toggles implement the <a href="../../#radiobutton">radio group design pattern.</a>
the alignment toggles provide the following keyboard support defined by the <a href="../../#radiobutton">radio group design pattern.</a>
As described in the pattern, nesting a radio group in a toolbar calls for an important behavioral difference compared to radios outside a toolbar: moving focus inside the group does not automatically change which button is checked.
</p>
<table aria-labelledby="kbd_label_3 kbd_label" class="def">
@@ -319,7 +319,7 @@ <h3 id="kbd_label_3">Radio Group (Text Alignment)</h3>
</thead>
<tbody>
<tr data-test-id="toolbar-radio-enter-or-space">
<th><kbd>Enter</kbd>,<br><kbd>Space</kbd></th>
<th><kbd>Enter</kbd><br><kbd>Space</kbd></th>
<td>
<ul>
<li>If the focused radio button is checked, do nothing.</li>
@@ -331,17 +331,19 @@ <h3 id="kbd_label_3">Radio Group (Text Alignment)</h3>
<th><kbd>Right Arrow</kbd></th>
<td>
<ul>
<li>Moves focus to the next radio button.</li>
<li>If the last radio button has focus, focus moves to the next control in the toolbar.</li>
<li>If the focused radio button is <strong>not</strong> the last radio button in the radio group, moves focus to the next radio button.</li>
<li>If the focused radio button is the last radio button in the radio group and is <strong>not</strong> the last element in the toolbar, moves focus to the next element in the toolbar.</li>
<li>If the focused radio button is the last radio button in the radio group and is also the last element in the toolbar, moves focus to the first element in the toolbar.</li>
</ul>
</td>
</tr>
<tr data-test-id="toolbar-radio-left-arrow">
<th><kbd>Left Arrow</kbd></th>
<td>
<ul>
<li>Moves focus to the previous radio button.</li>
<li>If the first radio button has focus, focus moves to the previous control in the toolbar.</li>
<li>If the focused radio button is <strong>not</strong> the first radio button in the radio group, moves focus to the previous radio button.</li>
<li>If the focused radio button is the first radio button in the radio group and is <strong>not</strong> the first element in the toolbar, moves focus to the previous element in the toolbar.</li>
<li>If the focused radio button is the first radio button in the radio group and is also the first element in the toolbar, moves focus to the last element in the toolbar.</li>
</ul>
</td>
</tr>
@@ -369,58 +371,47 @@ <h3 id="kbd_label_3">Radio Group (Text Alignment)</h3>

<section>
<h3 id="kbd_label_4">Button (Cut, Copy and Paste)</h3>
<p>NOTE: The <code>aria-disabled</code> attribute is used instead of the DOM <code>.disabled</code> property of the <code>button</code> element to identify the button as disabled. By using <code>aria-disabled</code> the button can receive keyboard focus and be part of the navigation of the toolbar when it's functionality is enabled or disabled.</p>
<table aria-labelledby="kbd_label_4" class="def">
<p>
The buttons for cut, copy, and paste provide the following keyboard support defined by the <a href="../../#button">button design pattern.</a>
While they are HTML button elements, as described in the accessibility features section above, in order to remain focusable when disabled, they use <code>aria-disabled</code> instead of the HTML <code>disabled</code> attribute.
</p>
<table aria-labelledby="kbd_label_4 kbd_label" class="def">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<th><kbd>Enter</kbd>,<br><kbd>Space</kbd></th>
<td>
If the button is enabled, activate the action associated with the button.
</td>
<tr data-test-id="toolbar-button-enter-or-space">
<th><kbd>Enter</kbd><br><kbd>Space</kbd></th>
<td>If the button is enabled, execute the action associated with the button. Otherwise, do nothing.</td>
</tr>
</tbody>
</table>
</section>

<section>
<h3 id="kbd_label_5">Menu Button (Font Family)</h3>
<p>The menu opens the font family menu and uses the <a href="../../#menubutton">Menu Button design pattern</a>.</p>
<table aria-labelledby="kbd_label_5" class="def">
<p>The menu button for opening the font family menu provides the following keyboard support defined by the <a href="../../#menubutton">menu button design pattern.</a></p>
<table aria-labelledby="kbd_label_5 kbd_label" class="def">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<th><kbd>Enter</kbd>,<br><kbd>Space</kbd></th>
<td>
Expand the menu if it include menu items.
</td>
</tr>
<tr>
<th><kbd>Down Arrow</kbd></th>
<td>
<ul>
<li>Expand the menu</li>
<li>Move focus to the first menu item.</li>
</ul>
</td>
</tr>
<tr>
<th><kbd>Up Arrow</kbd></th>
<tr data-test-id="toolbar-menubutton-enter-or-space-or-down-or-up">
<th>
<kbd>Enter</kbd><br>
<kbd>Space</kbd><br>
<kbd>Down Arrow</kbd><br>
<kbd>Up Arrow</kbd>
</th>
<td>
<ul>
<li>Moves focus to the previous menu item.</li>
<li>If the first menu item has focus, focus moves to the last menu item.</li>
</ul>
Open the menu and place focus on a menu item.
In this implementation, the focus is set on the currently selected font family when the menu opens.
</td>
</tr>
</tbody>
@@ -429,22 +420,20 @@ <h3 id="kbd_label_5">Menu Button (Font Family)</h3>

<section>
<h3 id="kbd_label_6">Menu (Font Family)</h3>
<p>The menu changes the font family in the <code>textarea</code> and uses the <a href="../../#menu">Menu design pattern</a>..</p>
<table aria-labelledby="kbd_label_6" class="def">
<p>The menu for choosing a font family provides the following keyboard support defined by the <a href="../../#menu">Menu design pattern.</a></p>
<table aria-labelledby="kbd_label_6 kbd_label" class="def">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<th><kbd>Enter</kbd>,<br><kbd>Space</kbd></th>
<td>
Select the menu item.
</td>
<tr data-test-id="toolbar-menu-enter-or-space">
<th><kbd>Enter</kbd><br><kbd>Space</kbd></th>
<td>Activate the menu item, close the menu, and place focus on the menu button.</td>
</tr>
<tr>
<tr data-test-id="toolbar-menu-down-arrow">
<th><kbd>Down Arrow</kbd></th>
<td>
<ul>
@@ -453,7 +442,7 @@ <h3 id="kbd_label_6">Menu (Font Family)</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="toolbar-menu-up-arrow">
<th><kbd>Up Arrow</kbd></th>
<td>
<ul>
@@ -462,97 +451,84 @@ <h3 id="kbd_label_6">Menu (Font Family)</h3>
</ul>
</td>
</tr>
<tr>
<th>
<kbd>ESC</kbd>,<br><kbd>Left Arrow</kbd>,<br><kbd>Right Arrow</kbd>
</th>
<td>
<ul>
<li>Close the menu.</li>
<li>Move focus back to the menu button.</li>
</ul>
</td>
<tr data-test-id="toolbar-menu-escape">
<th><kbd>ESC</kbd></th>
<td>Closes the menu and moves focus to the menu button.</td>
</tr>
</tbody>
</table>
</section>

<section>
<h3 id="kbd_label_7">Spin Button (Font Size)</h3>
<p>The spinbutton changes the size of the font in the <code>textarea</code> and uses the <a href="../../#spinbutton">Spin Button design pattern</a>..
<table aria-labelledby="kbd_label_7" class="def">
<p>The spin button for changing font size provides the following keyboard support as defined by the <a href="../../#spinbutton">spin button design pattern.</a></p>
<table aria-labelledby="kbd_label_7 kbd_label" class="def">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<tr data-test-id="toolbar-spinbutton-down-arrow">
<th><kbd>Down Arrow</kbd></th>
<td>
Decreases the font size of the text in the <code>textarea</code> by 1 points.
</td>
<td>Decreases the font size of the text in the <code>textarea</code> by 1 point.</td>
</tr>
<tr>
<tr data-test-id="toolbar-spinbutton-up-arrow">
<th><kbd>Up Arrow</kbd></th>
<td>
Increases the font size of the text in the <code>textarea</code> by 1 points.
</td>
<td>Increases the font size of the text in the <code>textarea</code> by 1 point.</td>
</tr>
<tr>
<th><kbd>Page Down Arrow</kbd></th>
<td>
Decreases the font size of the text in the <code>textarea</code> by 5 points.
</td>
<tr data-test-id="toolbar-spinbutton-page-down">
<th><kbd>Page Down</kbd></th>
<td>Decreases the font size of the text in the <code>textarea</code> by 5 points.</td>
</tr>
<tr>
<th><kbd>Page Up Arrow</kbd></th>
<td>
Increases the font size of the text in the <code>textarea</code> by 5 points.
</td>
<tr data-test-id="toolbar-spinbutton-page-up">
<th><kbd>Page Up</kbd></th>
<td>Increases the font size of the text in the <code>textarea</code> by 5 points.</td>
</tr>
</tbody>
</table>
</section>

<section>
<h3 id="kbd_label_8">Checkbox (Night Mode)</h3>
<p>The checkbox for night mode changes the foreground and background colors in the <code>textarea</code>.
<table aria-labelledby="kbd_label_8" class="def">
<p>
The checkbox for toggling night mode provides the following keyboard support defined in the <a href="../../#checkbox">checkbox design pattern.</a>
As an HTML input element, the browser provides the keyboard support.
</p>
<table aria-labelledby="kbd_label_8 kbd_label" class="def">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<th><kbd>Return</kbd>, <kbd>Space</kbd></th>
<td>
Toggle the state of the checkbox.
</td>
<tr data-test-id="toolbar-checkbox-enter-or-space">
<th><kbd>Enter</kbd><br><kbd>Space</kbd></th>
<td>Toggles the state of the checkbox.</td>
</tr>
</tbody>
</table>
</section>

<section>
<h3 id="kbd_label_9">Link (Help)</h3>
<p>Opens a new web page in the current window.</p>
<table aria-labelledby="kbd_label_9" class="def">
<p>
The link for opening a help page provides the following keyboard support as defined by the <a href="../../#link">link design pattern.</a>
As an HTML link, the keyboard support is provided by the browser.
</p>
<table aria-labelledby="kbd_label_9 kbd_label" class="def">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<th><kbd>Return</kbd>, <kbd>Space</kbd></th>
<td>
Activate the link.
</td>
<tr data-test-id="toolbar-link-enter-or-space">
<th><kbd>Enter</kbd><br><kbd>Space</kbd></th>
<td>Activate the link.</td>
</tr>
</tbody>
</table>