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

Navigation Treeview Example: Convert to single page example with functionality equivalent to disclosure navigation example #1558

Merged
merged 81 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
3aa7456
initial changes to treeview navigation
jongund Oct 6, 2020
165b50c
updated content creator
jongund Oct 7, 2020
dcdf4fc
updated dummy content
jongund Oct 7, 2020
c2ac656
udpated generating content, added landmarks and added open siblings
jongund Oct 7, 2020
67cca26
wrote some intial test for treeview navigation
jongund Oct 7, 2020
c8388f1
updated landmarks
jongund Oct 7, 2020
9f87f09
updated landmarks
jongund Oct 7, 2020
de7aa44
added word tuition to spelling
jongund Oct 7, 2020
0d8021f
fixed spelling mistake
jongund Oct 7, 2020
3c351ed
Update examples/treeview/treeview-navigation.html
jongund Oct 8, 2020
c807321
fixed some validation issues
jongund Oct 8, 2020
3a1ab47
fixed comment issue
jongund Oct 8, 2020
995fb94
added links to content
jongund Oct 8, 2020
500c5ad
updated tests and added space to default action
jongund Oct 8, 2020
5c2ef38
updated links to source code
jongund Oct 8, 2020
b844cef
fixed name function
jongund Oct 8, 2020
11773e0
updated to use SVG images
jongund Oct 15, 2020
708b63b
updated to use SVG images
jongund Oct 15, 2020
c9a5505
updated to use SVG images
jongund Oct 15, 2020
24c8d25
fixed linting error
jongund Oct 16, 2020
852bb4e
Merge branch 'master' into update-tree-nav
jongund Oct 19, 2020
72f7df7
merged master
jongund Oct 22, 2020
5e54c85
updated focus to h1, fixed left arrow bug, added landmarks
jongund Oct 22, 2020
b24cb59
fixed linting errors
jongund Oct 22, 2020
0a48d1c
fixed linting errors
jongund Oct 22, 2020
5b54bd1
added code pen support
jongund Oct 22, 2020
2c21881
added test cases fixed keyboard bugs
jongund Oct 23, 2020
99df35d
updated from master
jongund Oct 23, 2020
a2f76ee
updated spell
jongund Oct 23, 2020
89cffce
updated regression testing, documentation for landmarks, and fixed ke…
jongund Oct 24, 2020
5330813
removed roving tabindex and fixed HC for aria-current
jongund Oct 24, 2020
af06a79
fixed spelling and formatting bus, updated tabindex=0 documentation
jongund Oct 24, 2020
c9fd8cd
changed some aria-current styling
jongund Oct 24, 2020
e19a52d
fixed entities
jongund Oct 24, 2020
897a804
updated documentation on visual indication of aria-current
jongund Oct 24, 2020
af088b6
fixed linting bug
jongund Oct 24, 2020
321f9b7
updated event handlers to use 'on' instead of 'handle'
jongund Oct 25, 2020
c8bb09b
Update treeview-navigation.html
jongund Oct 26, 2020
391af5d
update documentation and adjust label for region
jongund Oct 27, 2020
6a9b4aa
fixed conflicts
jongund Nov 10, 2020
ffe2b41
fixed bug in showing aria-current link in treeview
jongund Nov 10, 2020
865f581
fixed spelling errors
jongund Nov 10, 2020
3aaea23
fixed spelling errors
jongund Nov 10, 2020
43aa5d7
Fix href in design pattern link in header and footer
mcking65 Nov 14, 2020
65d305d
Shorten title since we will now have just one nav tree example
mcking65 Nov 14, 2020
a335433
Add caution note at top directing people to disclosure pattern
mcking65 Nov 14, 2020
0fefffe
Revise intro
mcking65 Nov 14, 2020
cc241ed
fix missing word
carmacleod Nov 16, 2020
fbfd03c
updated aria-current styling
jongund Nov 20, 2020
02a7fd7
Add orange box style for the cautionary note (#1643)
carmacleod Dec 3, 2020
d22dc55
fixed conflicts
jongund Dec 4, 2020
d737efa
fixed coding practices and code pen issues
jongund Dec 4, 2020
3c6dae1
fixed linting errors
jongund Dec 4, 2020
3e0a292
Merge branch 'master' into update-tree-nav
mcking65 Dec 14, 2020
4f54e20
Fix some hrefs pointing to main doc and update examples index
mcking65 Dec 14, 2020
3315b1f
Editorial revision to comment about banner role
mcking65 Dec 14, 2020
ecdd900
navigational -> navigation
mcking65 Dec 14, 2020
5d9cfef
Editorial revision to footer contentinfo comment
mcking65 Dec 14, 2020
0459508
Incorporate high contrast documentation wording agreed upon for menu …
mcking65 Dec 14, 2020
9999add
Add content to accessibility features about the current page tree item
mcking65 Dec 14, 2020
3e816b9
Add documentation about enter key options
mcking65 Dec 14, 2020
0f5772b
Minor edits to prior commit
mcking65 Dec 14, 2020
1798def
Revise enter key behavior documentation
mcking65 Dec 14, 2020
46cf14a
Replace named entities for quote inside code tags with quote character
mcking65 Dec 14, 2020
d415aeb
Minor editorial revisions to landmark documentation
mcking65 Dec 14, 2020
2f7e89a
Simplify treeitem role documentation since treeitem role is only on l…
mcking65 Dec 14, 2020
47743bf
Minor editorial revisions to states and props documentation
mcking65 Dec 14, 2020
e4baab2
Fix 2 nits
mcking65 Dec 14, 2020
070e669
Remove links to old nav treeview examples and add links to new one
mcking65 Dec 14, 2020
9ecb722
made edits to accessibility notes
jongund Dec 14, 2020
1947ea0
made edits to note
jongund Dec 14, 2020
1acbbbc
Remove 'should' from Jon's keyboard note and simplify wording
mcking65 Dec 15, 2020
91a4198
fixed description of aria-current visual indication
jongund Dec 15, 2020
836829d
Merge branch 'update-tree-nav' of github.com:w3c/aria-practices into …
jongund Dec 15, 2020
7708e74
add some padding to the main class
jongund Dec 15, 2020
56d1d24
improved hover color contrast
jongund Dec 15, 2020
7afebf0
fixed bug in aria-current being visible when treeview loses focus
jongund Jan 12, 2021
92b6c21
added test case for aria-current always being visible
jongund Jan 12, 2021
7f28a94
Update examples/treeview/treeview-navigation.html
jongund Jan 13, 2021
529b455
Merge in latest master and fix conflicts
mcking65 Jan 19, 2021
1f9ca3b
Fix spelling in test script comment and update cspell.json
mcking65 Jan 19, 2021
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
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"Moscovium",
"MSAA",
"multithumb",
"navs",
"Nemeth",
"Nihonium",
"nodir",
Expand Down
156 changes: 156 additions & 0 deletions examples/treeview/css/treeview-navigation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
.page header {
border: #005a9c solid 2px;
background: #005a9c;
color: white;
text-align: center;
}

.page header .title {
font-size: 2.5em;
font-weight: bold;
font-family: serif;
}

.page header .tagline {
font-style: italic;
}

.page footer {
border: #005a9c solid 2px;
background: #005a9c;
font-family: serif;
color: white;
font-style: italic;
padding-left: 1em;
}

.page .body {
display: grid;
grid-template-columns: auto auto;
border: #eee solid 2px;
}

.page .body nav {
margin: 0;
padding: 6px;
width: 17em;
height: 60em;
background: #eee;
}

.page .body nav.focus {
padding: 4px;
border: 2px solid #005a9c;
}

.page .body .page {
margin: 0.25em;
padding: 0.25em;
height: 30em;
}

.page .body .page h1 {
margin: 0;
padding: 0;
}

.treeview-navigation ul,
.treeview-navigation li {
margin: 0;
padding: 0;
}

.treeview-navigation li li span.label {
padding-left: 1em;
}

.treeview-navigation li li li span.label {
padding-left: 2em;
}

.treeview-navigation[role="tree"] {
margin: 0;
padding: 0;
list-style: none;
}

.treeview-navigation[role="tree"] li {
margin: 0;
padding: 0;
list-style: none;
}

.treeview-navigation a[role="treeitem"] ul {
margin: 0;
padding: 0;
}

.treeview-navigation
a[role="treeitem"][aria-expanded="false"]
+ [role="group"] {
display: none;
}

.treeview-navigation a[role="treeitem"][aria-expanded="true"] + [role="group"] {
display: block;
}

.treeview-navigation a[role="treeitem"] > span svg {
transform: translate(0, 0);
}

.treeview-navigation a[role="treeitem"][aria-expanded="false"] > span svg {
transform: rotate(270deg) translate(2px, 2px);
}

.treeview-navigation a[role="treeitem"] {
margin: 0;
padding: 4px;
padding-left: 9px;
text-decoration: none;
color: #005a9c;
border: none;
display: block;
}

.treeview-navigation a[role="treeitem"][aria-current] {
border-left: 5px solid #005a9c;
padding-left: 4px;
background-color: #ddd;
}

.treeview-navigation a[role="treeitem"] span.icon svg polygon {
stroke-width: 2px;
fill: currentColor;
stroke: transparent;
}

/* disable default keyboard focus styling for treeitems
Keyboard focus is styled with the following CSS */

.treeview-navigation a[role="treeitem"]:focus {
outline: 0;
padding: 2px;
padding-left: 7px;
border: 2px #005a9c solid;
}

.treeview-navigation a[role="treeitem"][aria-current]:focus {
padding-left: 4px;
border-left-width: 5px;
}

.treeview-navigation a[role="treeitem"]:hover {
background-color: #ccc;
text-decoration: underline;
padding-left: 4px;
border-left: 5px solid #333;
}

.treeview-navigation a[role="treeitem"] span.icon:hover {
color: #333;
}

.treeview-navigation a[role="treeitem"] span.icon svg polygon:hover {
stroke: currentColor;
}
4 changes: 4 additions & 0 deletions examples/treeview/images/aria-current.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/treeview/images/down-arrow-brown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/treeview/images/right-arrow-brown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading