Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20909

Code macro scroll controls are not keyboard accessible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 15.3
    • Rendering - Code Macro
    • Unknown
    • Hide
      2.1.1 Keyboard

      Show
      2.1.1 Keyboard

    Description

      This is a violation of WCAG Success Criterion 2.1.1

      This [fails the wcag build|https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/master/215/testReport/org.xwiki.export.pdf.test.ui/AllITs/MySQL_8__Tomcat_9_jdk11__Chrome___Docker_tests_for_xwiki_platform_export_pdf___Build_for_MySQL_8__Tomcat_9_jdk11__Chrome___Docker_tests_for_xwiki_platform_export_pdf______/]:

      WCAG fails in the test class [org.xwiki.export.pdf.test.ui.AllITs]:
      __________
      Validation in the test method [codeMacro]
      Check for [org.xwiki.test.ui.po.ViewPage] at http://xwikiweb:8080/xwiki/bin/view/PDFExportIT/CodeMacro.
      Found [1] items

      1: Scrollable region must have keyboard access
      Description: Ensure elements that have scrollable content are accessible by keyboard
      Help URL: https://dequeuniversity.com/rules/axe/4.6/scrollable-region-focusable?application=axeAPI
      Help: Scrollable region must have keyboard access
      Impact: moderate
      Tags: cat.keyboard, wcag2a, wcag211

      HTML element:
      <div class="box"><div class="code">// This is a very long comment that gets cut when exported to PDF because it exceeds the print page width and the code macro preserves spaces which means it has to be displayed on a single line.</div></div>
      Selector: [.box]
      Fix any of the following:
      Element should have focusable content
      Element should be focusable

      ==> expected: <false> but was: <true>

      Here is a screenshot in context of this violation:

      Scroll overflow elements are supported by Firefox (the violation is not an issue there), but not on Chrome.

      The element should be focusable  (tabindex=0) for the scroll to be operated. There is no need to add extra scrolling logic, since this part is the responsibility of the browser.

      Attachments

        Issue Links

          Activity

            People

              Lucas C Charpentier Lucas
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: