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 disclosure menu example for issue 1028 #1070

Merged
merged 35 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4de72e4
create disclosure menu structure and files
smhigley May 14, 2019
47eb65d
working disclosure nav example with js and styles
smhigley Jun 3, 2019
57e635a
add disclosure nav tests
smhigley Jun 5, 2019
feef9e8
add arrow key behavior to menu and arrow key on/off checkbox
smhigley Jun 11, 2019
acacd93
prevent scroll when moving from button to menu
smhigley Jun 11, 2019
4302057
removed list separators, added escape documentation, added sample pag…
smhigley Jun 12, 2019
9e68018
update tests for new disclosure functionality
smhigley Jun 12, 2019
df88d09
documentation updates
smhigley Jun 18, 2019
41e03ea
remove menu wording, add aria-current
smhigley Jun 25, 2019
c9c77e0
update title and note for menu wording, add links to pattern
smhigley Jun 25, 2019
451695d
Merge branch 'master' into 1028-disclosure-menu-example
mcking65 Jul 6, 2019
ad35139
Merge pull request #1036 from smhigley/1028-disclosure-menu-example
mcking65 Jul 6, 2019
ed71bd6
Make title match H1 and adjust for consistency with other disclosure …
mcking65 Jul 6, 2019
c8b61e5
Cross link disclosure and menubar implementations of site nav
mcking65 Jul 6, 2019
dbfd340
Editorial revisions to introduction
mcking65 Jul 6, 2019
60f8389
Editorial revision to presentation of checkbox for toggling optional …
mcking65 Jul 6, 2019
30e8ed7
Editorial revisions to accessibility features section.
mcking65 Jul 6, 2019
3cb6396
Revise checkbox label
mcking65 Jul 6, 2019
609fbea
editorial revisions to keyboard table
mcking65 Jul 6, 2019
71e2881
Attributes table: add aria-current and replace named entities inside …
mcking65 Jul 6, 2019
3210ad2
create disclosure menu structure and files
smhigley May 14, 2019
0523bb4
working disclosure nav example with js and styles
smhigley Jun 3, 2019
8b48da7
add disclosure nav tests
smhigley Jun 5, 2019
63de26a
add arrow key behavior to menu and arrow key on/off checkbox
smhigley Jun 11, 2019
3f154de
prevent scroll when moving from button to menu
smhigley Jun 11, 2019
f760087
removed list separators, added escape documentation, added sample pag…
smhigley Jun 12, 2019
18eeb47
update tests for new disclosure functionality
smhigley Jun 12, 2019
3b8bc50
documentation updates
smhigley Jun 18, 2019
72f7ef1
remove menu wording, add aria-current
smhigley Jun 25, 2019
fae9ba7
update title and note for menu wording, add links to pattern
smhigley Jun 25, 2019
b141bc5
Editorial revisions
mcking65 Jul 6, 2019
75de977
Merge branch 'issue1028-disclosure-menu-example' of https://github.co…
mcking65 Jul 9, 2019
1431c0f
Revise description of screen reader interaction and reading modes in …
mcking65 Jul 9, 2019
77f84a1
fix and add tests
Jul 10, 2019
79893a9
Revise explanation for arrow keys being supplemental in accessibility…
mcking65 Jul 10, 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
1 change: 1 addition & 0 deletions aria-practices.html
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@ <h4>Examples</h4>
<ul>
<li><a href="examples/disclosure/disclosure-img-long-description.html">Disclosure (Show/Hide) of Image Description</a></li>
<li><a href="examples/disclosure/disclosure-faq.html">Disclosure (Show/Hide) of Answers to Frequently Asked Questions</a></li>
<li><a href="examples/disclosure/disclosure-navigation.html">Disclosure (Show/Hide) for Navigation Menus</a></li>
</ul>
</section>

Expand Down
89 changes: 89 additions & 0 deletions examples/disclosure/css/disclosure-navigation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.disclosure-nav {
background-color: #eee;
display: flex;
list-style-type: none;
padding: 0;
}

.disclosure-nav ul {
background-color: #eee;
border: 1px solid #005a9c;
border-top-width: 5px;
border-radius: 0 0 4px 4px;
display: block;
list-style-type: none;
margin: 0;
min-width: 200px;
padding: 0;
position: absolute;
}

.disclosure-nav li {
margin: 0;
}

.disclosure-nav ul a {
border: 0;
color: #000;
display: block;
margin: 0;
padding: 0.5em 1em;
text-decoration: underline;
}

.disclosure-nav ul a:hover,
.disclosure-nav ul a:focus {
background-color: #ddd;
margin-bottom: 0;
text-decoration: none;
}

.disclosure-nav ul a:focus {
outline: 5px solid rgba(0, 90, 156, 0.75);
position: relative;
}

.disclosure-nav button {
align-items: center;
border: 1px solid transparent;
border-right-color: #ccc;
display: flex;
padding: 1em;
}

.disclosure-nav button::after {
content: "";
border-bottom: 1px solid #000;
border-right: 1px solid #000;
height: 0.5em;
margin-left: 0.75em;
width: 0.5em;
transform: rotate(45deg);
}

.disclosure-nav button:focus {
border-color: #005a9c;
outline: 5px solid rgba(0, 90, 156, 0.75);
position: relative;
}

.disclosure-nav button:hover,
.disclosure-nav button[aria-expanded=true] {
background-color: #005a9c;
color: #fff;
}

.disclosure-nav button:hover::after,
.disclosure-nav button[aria-expanded=true]::after {
border-color: #fff;
}

/* Styles for example page content section */
.disclosure-pagecontent {
border: 1px solid #ccc;
padding: 1em;
}

.disclosure-pagecontent h3 {
margin-top: 0.5em;
}
3 changes: 3 additions & 0 deletions examples/disclosure/disclosure-faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ <h1>Example Disclosure (Show/Hide) for Answers to Frequently Asked Questions</h1
<li>
<a href="disclosure-img-long-description.html">Example Disclosure (Show/Hide) for an Image Description</a>
</li>
<li>
<a href="disclosure-navigation.html">Example Disclosure for Navigation Menus</a>
</li>
</ul>
<section>
<h2 id="ex_label">Example</h2>
Expand Down
3 changes: 3 additions & 0 deletions examples/disclosure/disclosure-img-long-description.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ <h1>Example Disclosure (Show/Hide) for Image Description</h1>
<li>
<a href="disclosure-faq.html">Example Disclosure (Show/Hide) for Answers to Frequently Asked Questions</a>
</li>
<li>
<a href="disclosure-navigation.html">Example Disclosure for Navigation Menus</a>
</li>
</ul>
<section>
<h2 id="ex_label">Example</h2>
Expand Down
Loading