Closed flacerdk closed 4 years ago
We should probably add aria-hidden
to that element. Tested here: https://codepen.io/seancurtis/pen/wvvrqpq
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.
Raised https://github.com/atlassian/react-beautiful-dnd/pull/1578 to solve it. Ended up just being able to hide it with display: none;
instead.
Closed by #1578
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