-
Notifications
You must be signed in to change notification settings - Fork 333
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
Restructure accordion example to remove DL, DT and DD elements for issue 815 #838
Merged
mcking65
merged 18 commits into
w3c:issue815-accordion-restructure
from
jongund:accordion
Sep 21, 2018
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9e304a1
update button example
jongund 4e59e79
fixed references to external file
jongund 76ff0ed
added auto rebase
jongund 75a87f2
Merge branch 'master' of https://github.com/jongund/aria-practices
jongund 0df77d2
removed gitcongif file
jongund 84dacfe
updated the html
jinzhou77 9cf9c86
unfinished
jinzhou77 ccc49d8
update the docs and div element exchange
jinzhou77 b932417
made edits to accordion and improved focus styling
jongund 3c9413f
made edits to include test refrence
jongund 996e12d
made edits to include test refrence
jongund 2af9917
Remove extra quote
mcking65 3f19144
Updated documentation
jongund bd695b1
removed divs from buttons, removed role=presentation and fixed firefo…
jongund 45ad1e0
Merge branch 'issue815-accordion-restructure' into accordion
mcking65 6a83331
Accordion: editorial revisions
mcking65 e542a5c
Accordion example: fix validation and editorial revisions
mcking65 bdbeb71
Fix quotes inside code elements
mcking65 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,16 +1,26 @@ | ||
.Accordion { | ||
border: 1px solid hsl(0, 0%, 82%); | ||
border-radius: .3em; | ||
box-shadow: 0 1px 2px hsl(0, 0%, 82%); | ||
margin: 0; | ||
padding: 0; | ||
border: 2px solid hsl(0, 0%, 82%); | ||
border-radius: 7px; | ||
width: 20em; | ||
} | ||
|
||
.Accordion.focus { | ||
border-color: hsl(216, 94%, 73%); | ||
} | ||
|
||
.Accordion.focus h3 { | ||
background-color: hsl(0, 0%, 97%); | ||
} | ||
|
||
|
||
.Accordion > * + * { | ||
border-top: 1px solid hsl(0, 0%, 82%); | ||
} | ||
|
||
.Accordion-trigger { | ||
sh0ji marked this conversation as resolved.
Show resolved
Hide resolved
|
||
background: none; | ||
border: 0; | ||
color: hsl(0, 0%, 13%); | ||
display: block; | ||
font-size: 1rem; | ||
|
@@ -20,20 +30,38 @@ | |
position: relative; | ||
text-align: left; | ||
width: 100%; | ||
outline: none; | ||
} | ||
|
||
.Accordion h3 { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.Accordion dt:first-child .Accordion-trigger { | ||
border-radius: .3em .3em 0 0; | ||
.Accordion *:first-child .Accordion-trigger { | ||
border-radius: 5px 5px 0 0; | ||
} | ||
|
||
.Accordion-trigger:focus, | ||
.Accordion-trigger:hover { | ||
background: hsl(0, 0%, 93%); | ||
background: hsl(216, 94%, 94%); | ||
} | ||
|
||
.Accordion button::-moz-focus-inner { | ||
border: 0; | ||
} | ||
|
||
.Accordion-title { | ||
display: block; /* For Edge bug https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8295099/ */ | ||
display: block; | ||
pointer-events: none; | ||
border: transparent 2px solid; | ||
border-radius: 5px; | ||
padding: 0.25em; | ||
outline: none; | ||
} | ||
|
||
.Accordion-trigger:focus .Accordion-title { | ||
border-color: hsl(216, 94%, 73%); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
} | ||
|
||
.Accordion-icon { | ||
|
@@ -42,15 +70,15 @@ | |
height: .5rem; | ||
pointer-events: none; | ||
position: absolute; | ||
right: 1.5em; | ||
right: 2em; | ||
top: 50%; | ||
transform: translateY(-60%) rotate(45deg); | ||
width: .5rem; | ||
} | ||
|
||
.Accordion-trigger:focus .Accordion-icon, | ||
.Accordion-trigger:hover .Accordion-icon { | ||
border-color: hsl(0, 0%, 13%); | ||
border-color: hsl(216, 94%, 73%); | ||
} | ||
|
||
.Accordion-trigger[aria-expanded="true"] .Accordion-icon { | ||
|
@@ -67,6 +95,10 @@ | |
display: none; | ||
} | ||
|
||
button { | ||
border-style: none; | ||
} | ||
|
||
fieldset { | ||
border: 0; | ||
margin: 0; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want a
h3
element here