Skip to content

Commit

Permalink
Remove screen reader pause
Browse files Browse the repository at this point in the history
Proposed solution for accordion NVDA bug
  • Loading branch information
Chris Yoong committed Jun 21, 2021
1 parent 23eaab6 commit 09b03c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 6 additions & 1 deletion src/govuk/components/accordion/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@

// Add toggle link with Chevron icon on right.
.govuk-accordion__toggle-link {
display: block;
display: inline;
margin-top: govuk-spacing(1);
margin-bottom: govuk-spacing(1);
color: $govuk-link-colour;
Expand All @@ -160,6 +160,11 @@
&:active {
background: $govuk-link-active-colour;
}

&:before {
content: "";
display: block;
}
}

// Allows the width of the focus state match the width of the content
Expand Down
6 changes: 0 additions & 6 deletions src/govuk/components/accordion/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ Accordion.prototype.initHeaderAttributes = function ($headerWrapper, index) {
var $wrapperFocusHeading = document.createElement('span')
$wrapperFocusHeading.classList.add(this.sectionHeadingClassFocusWrapper)

// Add pause after heading for assistive technology.
var $srPause = document.createElement('span')
$srPause.classList.add('govuk-visually-hidden')
$srPause.innerHTML = ', '

// Build additional copy for assistive technology
var srAdditionalCopy = document.createElement('span')
srAdditionalCopy.classList.add('govuk-visually-hidden')
Expand All @@ -151,7 +146,6 @@ Accordion.prototype.initHeaderAttributes = function ($headerWrapper, index) {
$heading.appendChild($button)
$button.appendChild($wrapperFocusHeading)
$wrapperFocusHeading.innerHTML = $span.innerHTML
$button.appendChild($srPause)

// If summary content exists add to DOM in correct order
if (typeof ($summary) !== 'undefined' && $summary !== null) {
Expand Down

0 comments on commit 09b03c9

Please sign in to comment.