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
Show file tree
Hide file tree
Changes from all commits
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
61 changes: 44 additions & 17 deletions examples/toolbar/css/menuButton.css
Original file line number Diff line number Diff line change
@@ -1,35 +1,62 @@
button {
cursor: pointer;
font-size: 110%;
[role='toolbar'] .menu-popup {
position: relative;
}

.menu-wrapper {
position: relative
}
[role='toolbar'] .menu-popup [role="menu"] {
padding: 0;
width: 9.5em;
border: 2px solid #DDD;
border-radius:5px;
background-color: white;

ul[role="menu"] {
display: none;
position: absolute;
margin: 0;
padding: 0;
z-index: 1;
}

ul[role="menu"] li {
[role='toolbar'] .menu-popup [role="menu"].focus {
border-color: #005A9C;
}

[role='toolbar'] .menu-popup [role="menu"] li {
padding: 0;
margin: 0;
display: block;
text-align: left;
list-style: none;
}

[role="menu"] {
[role='toolbar'] .menu-popup [role="menu"] [role="menuitemradio"] {
padding: 0;
width: 8em;
border: thin solid black;
background-color: #EEEEEE;
padding-top: 1px;
padding-bottom: 1px;
padding-left: 2px;
padding-right: 2px;
outline:0;
border: none;
border-radius: 0;
}
[role="menuitem"] {
padding: 0.25em;

[role='toolbar'] .menu-popup [role="menu"] [role="menuitemradio"]:before {
content: url('../images/menuitemradio-unchecked.svg');
}

[role='toolbar'] .menu-popup [role="menu"] [role="menuitemradio"][aria-checked="true"]:before {
content: url('../images/menuitemradio-checked.svg');
}

[role="menuitem"]:focus,
[role="menuitem"]:hover {
background-color: #FFFFFF;
[role='toolbar'] .menu-popup [role="menu"] [role="menuitemradio"]:focus,
[role='toolbar'] .menu-popup [role="menu"] [role="menuitemradio"]:hover {
background:rgb(226, 239, 255);
border-top: 1px solid #005A9C;
border-bottom: 1px solid #005A9C;
padding-top: 0px;
padding-bottom: 0px;
}

[role='toolbar'] .menu-popup [role="menu"] [role="menuitemradio"]:focus {
border-color: #005A9C;
}

156 changes: 122 additions & 34 deletions examples/toolbar/css/toolbar.css
Original file line number Diff line number Diff line change
@@ -1,49 +1,137 @@
.annotate {
color: #366ED4;
font-style: italic;
[role="toolbar"] {
border:1px #ECECEA solid;
border-radius:5px;
padding: 6px;
height: 44px;
width: 1050px;
background-color:#ECECEA;
border:2px solid transparent;
}

.toolbar {
border-left: 1px solid #aaa;
margin-top: 10px;
font-size: 0;
[role="toolbar"].focus {
border-color:#005A9C;
border-width: 3px;
padding:5px;
}

.toolbar-item {
display: inline-block;
padding: 0.5em 1em;
[role="toolbar"] .group {
padding:0.25em;
display: block;
float: left;
}

[role="toolbar"] .group:not(:first-child) {
margin-left: 0.75em;
}

[role="toolbar"] button,
[role="toolbar"] [role="radio"],
[role="toolbar"] label,
[role="toolbar"] .spinbutton,
[role="toolbar"] a,
[role="toolbar"] .input {
border: 1px solid rgb(255, 255, 255);
outline:none;
display: inline-block;
padding: 6px 12px;
border-radius:5px;
text-align: center;
background: rgb(255, 255, 255);
color: #222428;
font-size: 14px;
line-height: 1.5em;
margin-right:0.25em;
}

[role="toolbar"] button[aria-pressed="true"],
[role="toolbar"] [role="radio"][aria-checked="true"] {
border-color:#555;
font-weight: bold;
background-color: #F4F4F4;
}


[role="toolbar"] button[aria-disabled="true"] {
color: #889;
cursor: not-allowed;
}

background: #eee;
border: 1px solid #aaa;
border-left: none;
color: blue;
font-size: 16px;
line-height: 1.5em;
vertical-align: top;
[role="toolbar"] button[aria-disabled="true"]:focus {
border-color:#005A9C;
}

.toolbar-item.selected {
background-color: #ccc;
color: black;
font-weight: bold;
[role="toolbar"] button:focus,
[role="toolbar"] [role="radio"]:focus,
[role="toolbar"] .spinbutton:focus,
[role="toolbar"] .focus,
[role="toolbar"] a:focus{
border-width:2px;
border-color:#005A9C;
background:rgb(226, 239, 255);
padding: 5px 11px;
}

.menu-wrapper {
[role="toolbar"] button:hover,
[role="toolbar"] [role="radio"]:hover,
[role="toolbar"] .spinbutton:hover,
[role="toolbar"] label.input:hover,
[role="toolbar"] a:hover{
border-color:#005A9C;
background:rgb(226, 239, 255);
}

[role="toolbar"] button::-moz-focus-inner {
border: 0;
}

[role="toolbar"] [role="spinbutton"] .value,
[role="toolbar"] [role="spinbutton"] .increase,
[role="toolbar"] [role="spinbutton"] .decrease {
width: 60px;
display: inline-block;
font-size: 16px;
padding: 0;
margin: 0;
}

[role="toolbar"] button[aria-haspopup] span {
float: right;
}

[role="toolbar"] button[aria-haspopup] span:after {
content: url(../images/pulldown-icon.svg);
}

[role="toolbar"] button[aria-haspopup]:focus span:after {
content: url(../images/pulldown-icon-focus.svg);
}

.menu-button {
padding-right: 2.5em;
position: relative;
[role="toolbar"] [role="spinbutton"] .increase,
[role="toolbar"] [role="spinbutton"] .decrease {
width: 20px;
border: 1px solid #ECECEA;
border-radius: 3px;
background-color:#ECECEA;
border: 1px solid #ECECEA;
}

.menu-button::after {
content: " ";
border-left: 0.4em solid transparent;
border-right: 0.4em solid transparent;
border-top: 0.4em solid black;
position: absolute;
right: 1em;
top: 1.1em;
[role="toolbar"] [role="spinbutton"] .increase:hover,
[role="toolbar"] [role="spinbutton"] .decrease:hover,
[role="toolbar"] [role="spinbutton"]:focus .increase,
[role="toolbar"] [role="spinbutton"]:focus .decrease{
fill:#005A9C;
border-color: #005A9C;
}


textarea {
width: 990px;
padding: .25em;
border: 2px solid black;
height: 400px;
font-size: 14pt;
font-family: sans-serif;
border-radius: 5px;
}



25 changes: 25 additions & 0 deletions examples/toolbar/help.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Toolbar Example | WAI-ARIA Authoring Practices 1.1</title>

<!-- Core js and css shared by all examples; do not modify when using this template. -->
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/base.css">
<link rel="stylesheet" href="../css/core.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<script src="../js/examples.js"></script>
<script src="../js/highlight.pack.js"></script>
<script src="../js/app.js"></script>
<script src="../js/utils.js" type="text/javascript"></script>

</head>

<body>

<h1>Toolbar Help</h1>

<p>Learn more about toolbar behaviors by reading the <a href="https://www.w3.org/TR/wai-aria-practices-1.1/#toolbar">ARIA Authoring Practices Guide</a>.</p>

</body>
</html>
3 changes: 3 additions & 0 deletions examples/toolbar/images/menuitemradio-checked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions examples/toolbar/images/menuitemradio-unchecked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions examples/toolbar/images/pulldown-icon-focus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions examples/toolbar/images/pulldown-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading