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

Provide a reusable keyboard handler for the non-button elements that have the button role

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14
    • None
    • Unknown

    Description

      Some elements that are not buttons get the button role, because their markup can't be a real button element: for instance the rendering errors, whose markup is generated by xwiki-rendering, the panel resize handle in leftpanels.vm, or the a elements with the button role in drawer_macros.vm. A real button is activated with both the Enter and Space keys, but these elements only react to the keys that their own element supports: a div reacts to none of them, and a link only reacts to Enter. Keyboard users then can't activate them the way they activate any other button.

      Each of them currently needs its own keydown listener to fix this, like the one added for the rendering errors in XWIKI-23602. XWiki should provide a reusable handler instead, that the elements with the button role can use to be activated with Enter and Space like a real button.

      This was discussed in https://github.com/xwiki/xwiki-platform/pull/4670#discussion_r4452298174.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: