-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Disclosure Examples to Use DL Semantics and Revise CSS
Per discussion in issue #264 and #265 for review of disclosure examples, made the following changes. 1. Use CSS generated images instead of entities for visual state information 2. For disclosure controls, use HTML button element instead of span elements with role=button 3. In FAQ, moved answers inside of a `p` element inside of the `dd` element. 4. Fixed call to method for displaying html source. 5. Revised title and H1 to include the word "Example". 6. Change heading inside long description example to H3 from H2 7. Fix typos 8. Add accessibility features section describing use of CSS.
- Loading branch information
Showing
7 changed files
with
345 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,49 @@ | ||
[role="button"]:hover, | ||
[role="button"]:focus { | ||
background-color: #eee; | ||
text-decoration: underline; | ||
} | ||
|
||
[role="button"]:active { | ||
background-color: #bbb; | ||
} | ||
|
||
[role="button"][aria-expanded="false"]:before { | ||
content: "\0025BA \0000A0"; | ||
color: #630; | ||
|
||
} | ||
|
||
[role="button"][aria-expanded="true"]:before { | ||
content: "\0025BC \0000A0"; | ||
color: #630; | ||
} | ||
|
||
dl.faq dt { | ||
dl.faq button { | ||
margin: 0; | ||
padding: 0; | ||
margin-top: 0.5em; | ||
margin-top: 1em; | ||
font-weight: bold; | ||
font-size: 110%; | ||
border: thin solid transparent; | ||
background-color: transparent; | ||
padding-left: 0.125em; | ||
} | ||
|
||
|
||
dl.faq dd { | ||
dl.faq .desc { | ||
margin: 0; | ||
padding: 0; | ||
margin-top: 0.25em; | ||
margin-left: 1.5em; | ||
font-size: 110%; | ||
display: none; | ||
} | ||
|
||
dl.faq button:hover, | ||
dl.faq button:focus { | ||
background-color: #eee; | ||
} | ||
|
||
dl.faq button:focus { | ||
border-color: #663300; | ||
} | ||
|
||
dl.faq button:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
dl.faq button:active { | ||
background-color: #bbb; | ||
} | ||
|
||
dl.faq button[aria-expanded="false"]:before { | ||
content: url('../images/right-arrow-brown.png'); | ||
padding-right: 0.35em; | ||
|
||
} | ||
|
||
dl.faq button[aria-expanded="true"]:before { | ||
content: url('../images/down-arrow-brown.png'); | ||
padding-right: 0.35em; | ||
} | ||
|
38 changes: 29 additions & 9 deletions
38
examples/disclosure/css/disclosure-img-long-description.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,39 @@ | ||
[role="button"]:hover, | ||
[role="button"]:focus { | ||
figure button { | ||
margin: 0; | ||
padding: 0; | ||
margin-top: 1em; | ||
display: block; | ||
font-size: 110%; | ||
border: thin solid transparent; | ||
background-color: transparent; | ||
padding-left: 0.125em; | ||
position: relative; | ||
left: -0.35em; | ||
} | ||
figure button:hover, | ||
figure button:focus { | ||
background-color: #eee; | ||
} | ||
|
||
figure button:focus { | ||
border-color: #663300; | ||
} | ||
|
||
figure button:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
[role="button"]:active { | ||
figure button:active { | ||
background-color: #bbb; | ||
} | ||
|
||
[role="button"][aria-expanded="false"]:before { | ||
content: "\0025BA"; | ||
color: #630; | ||
figure button[aria-expanded="false"]:before { | ||
content: url('../images/right-arrow-brown.png'); | ||
padding-right: 0.25em; | ||
} | ||
|
||
[role="button"][aria-expanded="true"]:before { | ||
content: "\0025BC"; | ||
color: #630; | ||
figure button[aria-expanded="true"]:before { | ||
content: url('../images/down-arrow-brown.png'); | ||
padding-right: 0.25em; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.