You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-beautiful-dnd creates a div with id rbd-lift-instruction-0 and places it as a direct child of body. This makes accessibility tools such as react-axe complain about it not being placed inside a landmark:
moderate: All page content must be contained by landmarks https://dequeuniversity.com/rules/axe/3.4/region?application=axeAPI
Element: <html lang="en">
Fix any of the following:
Some page content is not contained by landmarks
Related nodes
HTML: <div id="rbd-lift-instruction-0" style="position: absolute; width: 1px; height: 1px; margin: -1px; border: 0px none; padding: 0px; overflow: hidden; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(100%);">
Expected behavior
I'd expect it to create the element inside a react-beautiful-dnd context (say inside a Draggable) and not as a child of body.
open Storybook and go to "Landmark issue". You'll see the axe errors in the console
Suggested solution?
There might be a good reason why the div is rendered as a child of body, but I don't see why it can't be a child of, say, the first Draggable that gets rendered inside a DragDropContext. This would ensure that the div is inside a landmark whenever the context itself is.
What version of React are you using?
16.9.0
What version of react-beautiful-dnd are you running?
This should prevent aXe auditing it, and we really don't want that description announced if someone decides to read the whole page. It's supplementary information only. I wish we had an aria-description attribute.
react-beautiful-dnd creates a div with id
rbd-lift-instruction-0
and places it as a direct child ofbody
. This makes accessibility tools such as react-axe complain about it not being placed inside a landmark:Expected behavior
I'd expect it to create the element inside a react-beautiful-dnd context (say inside a
Draggable
) and not as a child ofbody
.Steps to reproduce
npm install react-axe
stories/
:npm run storybook
Suggested solution?
There might be a good reason why the div is rendered as a child of
body
, but I don't see why it can't be a child of, say, the first Draggable that gets rendered inside a DragDropContext. This would ensure that the div is inside a landmark whenever the context itself is.What version of
React
are you using?16.9.0
What version of
react-beautiful-dnd
are you running?12.0.0
What browser are you using?
Firefox 70.0
Demo
https://codesandbox.io/s/vertical-list-f4ykm
The text was updated successfully, but these errors were encountered: