Jira Cloud accessibility: choosing WCAG 2.2 focus‑visible vs WCAG 2.1 AA for issue‑creation modal
0 reputation · 07 Oct 2020, 07:06 UTC
0 reputation · 07 Oct 2020, 07:06 UTC
Jira Cloud’s issue‑creation modal uses ARIA‑labelled buttons, but keyboard navigation sometimes skips the description field and the modal trap does not return focus to the Create button after closing via Escape. Automated scans also flag low contrast for priority dropdown icons. An internal design ticket debates whether the next major release should adopt WCAG 2.2’s new focus‑visible success criterion or retain the existing WCAG 2.1 AA baseline.
The goal is to decide which accessibility baseline to target for the issue‑creation workflow while balancing backward compatibility, differences between Cloud and Data Center front‑ends, and verification results from axe core, screen‑reader testing, and keyboard‑only navigation.
What impact would adopting WCAG 2.2 focus‑visible have on the current Tab order and focus‑return behavior in the modal? How would the change affect screen‑reader announcement consistency for the description field when the modal opens? What trade‑offs exist between achieving WCAG 2.2 compliance and preserving the existing focus behavior for Jira Data Center/Server users?
35775 reputation · 07 Oct 2020, 15:17 UTC
Adopting WCAG 2.2's focus-visible criterion will not, by itself, fix the three defects you describe. Focus-visible is a styling/visibility requirement (SC 2.4.11/2.4.13 in WCAG 2.2 refine how keyboard focus is indicated and ensure it isn't obscured); it does not repair a broken tab order, a missing focus-return on Escape, or low-contrast icons. Those are separate failures under WCAG 2.1 AA already — SC 2.4.3 (Focus Order), SC 2.1.2 (No Keyboard Trap, and the de-facto focus-return expectation for modals), and SC 1.4.3/1.4.11 (Contrast). So the honest answer to the design ticket is: fix the defects first, then decide the baseline.
Focus-visible changes only which focus indicator is shown (keyboard-triggered focus vs. pointer-triggered focus). It does not reorder the DOM. If Tab skips the description field today, the cause is almost certainly one of:
tabindex="-1" or missing tabindex on the rich-text wrapper,tabindex elsewhere distorting the sequence.Applying :focus-visible styles can actually mask this: if focus is programmatically moved to the description field, it will look correctly focused while keyboard users still can't reach it. Verify the DOM order directly:
// In DevTools console, with the modal open:
const els = [...document.querySelectorAll(
'[role="dialog"] button, [role="dialog"] textarea, [role="dialog"] [tabindex]'
)];
els.forEach(e => console.log(e.tabIndex, e.getAttribute('aria-label') || e.id));For the Escape/focus-return issue, the modal should store document.activeElement on open and restore it on close. Focus-visible doesn't change this logic, but if your new styles only apply to :focus-visible and the browser heuristics classify the restored focus as non-keyboard, the Create button may receive focus without a visible indicator — a regression you'd only catch by manual keyboard testing, not by axe.
Focus-visible has no direct effect on announcements. NVDA/JAWS/VoiceOver announce based on the accessibility tree: the field's aria-label/aria-labelledby, role, and where focus actually lands. The risk is indirect: if you fix the tab order (moving the description field earlier in the DOM), the announcement sequence when the modal opens may change, and any ARIA live-region or aria-describedby on the dialog should be re-tested. Test with NVDA + Chrome and VoiceOver + Safari after the DOM fix, not after the CSS change.
This is the real constraint. :focus-visible is supported in all current evergreen browsers, but Data Center/Server deployments often run older Atlassian front-end stacks and must support customer-pinned older browsers. Options:
focus-visible polyfill adds a class-based fallback, but it adds JS weight and can lag on rapid Tab presses.:focus and :focus-visible identically. You lose the "hide outline on mouse click" refinement but keep one code path that works everywhere — often the pragmatic choice for an enterprise product.The low-contrast priority icons flagged by axe are orthogonal: fix them with color changes against SC 1.4.11 (non-text contrast, 3:1) regardless of which baseline you pick.
:focus, :focus-visible styling approach so behavior doesn't diverge.One caveat worth flagging for review: exact success-criterion numbering and Jira's current front-end behavior vary by release, so confirm against the WCAG 2.2 recommendation text and your specific Jira Cloud/DC versions before committing the design ticket.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.