Skip to content

Commit 09c4bc8

Browse files
committed
Add ARIA attributes to help widget navigation arrows for accessibility
1 parent 3d8acaf commit 09c4bc8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

js/widgets/help.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ class HelpWidget {
7979
// this._helpDiv.style.overflowY = "auto";
8080

8181
const innerHTML = `
82-
<div id="right-arrow" class="hover" tabindex="0" role="button" aria-label="${_("Next")}"></div>
83-
<div id="left-arrow" class="hover" tabindex="0" role="button" aria-label="${_("Previous")}"></div>
82+
<div id="right-arrow" class="hover" tabindex="0" role="button" aria-label="${_(
83+
"Next"
84+
)}"></div>
85+
<div id="left-arrow" class="hover" tabindex="0" role="button" aria-label="${_(
86+
"Previous"
87+
)}"></div>
8488
<div id="helpButtonsDiv" tabindex="-1"></div>
8589
<div id="helpScrollWrapper">
8690
<div id="helpBodyDiv" tabindex="-1"></div>
@@ -470,10 +474,10 @@ class HelpWidget {
470474

471475
const helpDivHTML =
472476
'<div id="right-arrow" class="hover" tabindex="0" role="button" aria-label="' +
473-
_("Next") +
474-
'"></div><div id="left-arrow" class="hover" tabindex="0" role="button" aria-label="' +
475-
_("Previous") +
476-
'"></div><div id="helpButtonsDiv" tabindex="-1"></div><div id="helpScrollWrapper"><div id="helpBodyDiv" tabindex="-1"></div></div>';
477+
_("Next") +
478+
'"></div><div id="left-arrow" class="hover" tabindex="0" role="button" aria-label="' +
479+
_("Previous") +
480+
'"></div><div id="helpButtonsDiv" tabindex="-1"></div><div id="helpScrollWrapper"><div id="helpBodyDiv" tabindex="-1"></div></div>';
477481
this._helpDiv.insertAdjacentHTML("afterbegin", helpDivHTML);
478482

479483
this.widgetWindow.getWidgetBody().append(this._helpDiv);

0 commit comments

Comments
 (0)