Chrome (since v132) and Firefox now make scrollable regions keyboard focusable on their own, so the code macro box can be scrolled with the keyboard there without any change in XWiki.
Safari still doesn't, see WebKit bug 190870, open since 2018 and untouched since 2023.
axe-core acknowledged this in 4.11.2: the scrollable-region-focusable rule now only targets Safari ("Ensure elements that have scrollable content are accessible by keyboard in Safari").
In the latest WCAG build (Environment Tests master #1402), this rule is reported only twice, as warnings, both in PDFExportIT: codeMacro and autoScaleTable. The second one is a wide table, not the code macro.
Working around it in XWiki would mean adding JavaScript that makes every box focusable when it overflows, re-evaluated when the window is resized, to compensate for a browser bug, which was already considered overkill above. So I'll close this as Won't Fix once https://github.com/xwiki/xwiki-platform/pull/4460 is merged. That PR skips the WCAG validation on the 2 test pages, with a comment pointing to the WebKit bug so the workaround can be dropped once Safari fixes it.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.