mono-company / jungle-docs

Mono's BEM ITCSS framework - Documentation website (OLD)
Other
1 stars 0 forks source link

Investigate better a11y for dropdowns #18

Open Wolfr opened 4 years ago

Wolfr commented 4 years ago

This code leads to a big problem in the accessibility tree:

for (let i = 0; i < dropdowns.length; i += 1) {
  bodyElement.appendChild(dropdowns[i]);
  dropdowns[i].addEventListener('click', handleDropdownClick, false);
}

I noticed on the tippyjs documentation that they have this comment

  // in the DOM source order, which is why it has its own wrapper element
  appendTo: 'parent',

We could first look into removing the dropdown code lines that change the location to the bottom of the DOM; then test whether that works. Then we could look into improved dropdowns.