Skip to content

Commit

Permalink
Merge pull request #36 from ankerpeet/master
Browse files Browse the repository at this point in the history
Added aria-expanded attribute to the transcript and credit buttons
  • Loading branch information
nathanlogan authored Feb 4, 2020
2 parents d89d9a6 + 7bed445 commit 77a3296
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/content/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@healthwise-ui/content",
"version": "0.0.12",
"version": "0.0.13",
"description": "Shared React UI library to use with Healthwise content.",
"main": "index.js",
"unpkg": "healthwise-ui.min.js",
Expand Down
7 changes: 5 additions & 2 deletions packages/content/src/MediaCredits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class MediaCredits extends Component {
this.setState({
showDisclaimer: false,
showCredits: false,
showTranscript: newState,
showTranscript: newState,
})
}

Expand Down Expand Up @@ -361,6 +361,7 @@ class MediaCredits extends Component {
aria-controls={transcriptId}
type="button"
onClick={this.toggleTranscript}
aria-expanded={this.state.showTranscript}
>
<IconSpan>
<svg
Expand All @@ -387,6 +388,7 @@ class MediaCredits extends Component {
aria-controls={transcriptId}
type="button"
onClick={this.toggleTranscript}
aria-expanded={this.state.showTranscript}
>
<IconSpan>
<svg
Expand Down Expand Up @@ -433,11 +435,12 @@ class MediaCredits extends Component {
aria-controls={creditsId}
type="button"
onClick={this.toggleCredits}
aria-expanded={this.state.showCredits}
>
Credits
</NavItemActiveButton>
) : (
<NavItemButton aria-controls={creditsId} type="button" onClick={this.toggleCredits}>
<NavItemButton aria-controls={creditsId} type="button" onClick={this.toggleCredits} aria-expanded={this.state.showCredits}>
Credits
</NavItemButton>
)}
Expand Down

0 comments on commit 77a3296

Please sign in to comment.