Summary
Several pop-up close controls are implemented as <a> elements with role="button", but their JavaScript handlers listen only for click.
Affected controls include:
<a href="" id="report-close" ... role="button"></a>
<a href="" id="share-close" ... role="button"></a>
<a href="" id="fittslaw" role="button" ...>
src/js/popup.js attaches only click handlers to these controls.
Accessibility problem
Adding role="button" causes assistive technology to expose these elements as buttons. Keyboard users therefore expect standard button keyboard behaviour.
A native anchor can be activated with Enter, but Space does not provide native button activation. This makes the semantic role and keyboard behaviour inconsistent.
Expected behavior
The preferred solution would be to use native:
elements for these controls and preserve the existing visual styling.
If anchors need to be retained, keyboard handling should implement the expected Space/Enter button behaviour and prevent the default Space action where appropriate.
Using native buttons would also reduce the amount of custom accessibility behaviour that needs to be maintained.
Summary
Several pop-up close controls are implemented as
<a>elements withrole="button", but their JavaScript handlers listen only forclick.Affected controls include:
src/js/popup.jsattaches onlyclickhandlers to these controls.Accessibility problem
Adding
role="button"causes assistive technology to expose these elements as buttons. Keyboard users therefore expect standard button keyboard behaviour.A native anchor can be activated with Enter, but Space does not provide native button activation. This makes the semantic role and keyboard behaviour inconsistent.
Expected behavior
The preferred solution would be to use native:
elements for these controls and preserve the existing visual styling.
If anchors need to be retained, keyboard handling should implement the expected Space/Enter button behaviour and prevent the default Space action where appropriate.
Using native buttons would also reduce the amount of custom accessibility behaviour that needs to be maintained.