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 9 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 @@ -212,6 +212,7 @@
"treeitem",
"Treeview",
"Tryens",
"tuition",
"uncheck",
"Unchecking",
"unchecks",
Expand Down
122 changes: 122 additions & 0 deletions examples/treeview/css/treeview-navigation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#ex1 header {
spectranaut marked this conversation as resolved.
Show resolved Hide resolved
border: #005a9c solid 2px;
background: #005a9c;
color: white;
text-align: center;
}

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

#ex1 header .tagline {
font-style: italic;
}

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

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

#ex1 .body nav {
margin: 0;
padding: 0.5em;
width: 17em;
height: 50em;
background: #eee;
}

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

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

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

.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[role="tree"] a {
text-decoration: underline;
border-color: transparent;
}

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

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

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

.treeview-navigation [role="treeitem"][aria-expanded="false"] > span::before {
content: url(../images/right-arrow-brown.png);
position: relative;
left: -0.25em;
}

.treeview-navigation [role="treeitem"][aria-expanded="true"] > span::before {
content: url(../images/down-arrow-brown.png);
position: relative;
left: -0.25em;
}

.treeview-navigation a[role="treeitem"] {
width: 16em;
margin: 0;
padding: 4px;
text-decoration: none;
}

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

.treeview-navigation [role="treeitem"]:focus {
outline: 0;
background-color: #ddd;
padding: 2px;
border: 2px black solid;
}

.treeview-navigation [role="treeitem"]:hover {
background-color: #ccc;
text-decoration: underline;
}
26 changes: 26 additions & 0 deletions examples/treeview/js/navigation-content-generator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* This content is licensed according to the W3C Software License at
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*
* File: navigation-content-generator.js
*/

"use strict";

var NavigationContentGenerator = function (name) {

this.name = name;
this.fillerTextSentences = [];

this.fillerTextSentences.push('The content on this page is associated with the $title link for $name.');
this.fillerTextSentences.push('The text content in this paragraph is filler text providing a detectable change of content when the $title link is selected from the menu. ');
this.fillerTextSentences.push('$name doesn\'t really exist, but the use of an organizational name is useful to provide content for the $title link. ');
this.fillerTextSentences.push('Since $name doesn\'t exist there really is no real content associated with the $title link.');
};

NavigationContentGenerator.prototype.generateParagraph = function (title) {
var content = '';
this.fillerTextSentences.forEach(s => content += s.replace('$name', this.name).replace('$title', title));
return content;
}

Loading