plone / plone.app.mosaic

Plone Mosaic main repository
https://pypi.python.org/pypi/plone.app.mosaic
GNU General Public License v2.0
34 stars 26 forks source link

Accessibility Issue, Keyboard Navigation not possible #587

Open Nimo-19 opened 7 months ago

Nimo-19 commented 7 months ago

During our Update from Plone 5.2 to Plone 6 we noticed, that the Navigation via Keyboard in the Mosaic Editor does not work anymore.

It is not possible to activate the Toolbar-Buttons via Enter. Some Event Handler seems to prevent it. Even if you manage to open the 'Properties' Modal somehow, it is not possible to move to a different tab than the 'Default' tab, again some eventhandler seems to prevent the enter key from working. (On a normal Plone edit view this works as expected).

In addition it seems not possible to reach the Edit button (e.g. on a Content listing tile) of a tile via the keyboard.

I tried all the above with a fresh plone classic 6.0.8 and plone.app.mosaic 3.1.5

Nimo-19 commented 7 months ago

Accessing the edit button ( e.g. on the Content listing tile) is somehow prevented by the keydown listner in mosaic.layout.js#L353 Don't know what this is supposed to do, but it seems prevent the edit button from being accessed. Seems to me this should be somehow for new tiles. So eventueally query for .closest('.mosaic-tile:not(:focus-within)') in mosaic.layout.js#L359 Seems to work for me. Not sure if it breaks something different.

Additionally Sometimes the control buttons aren't event visible. Pure focus via tab does not 'select' the tile it seems.

Maybe make the buttons visible on .mosaic-tile:focus-within instead of .mosaic-selected-tile (or in addition)

Nimo-19 commented 7 months ago

The issue that the toolbar buttons can not be activated via keyboar can be fixed by switching from mousedown to click event in /mosaic.toolbar.js#L399