WebAIM - Web Accessibility In Mind

E-mail List Archives

Invalid ARIA attribute value - is this a problem?

for

From: Mark Magennis
Date: Jun 19, 2017 5:21AM


Quick question, I hope. aXe is reporting an invalid ARIA attribute value aria-controls="navbar-dropdown-option-1-dropdown" in the following code for a mega-menu.

<button aria-expanded="false" aria-controls="navbar-dropdown-option-1-dropdown">
<div id="navbar-dropdown-option-1-dropdown" aria-hidden="false">

Investigation reveals that the div in the second line is only being added to the DOM when the mega-menu is opened. So technically, aXe is right because the id doesn't exist until then. But is this likely to cause any issues in practice?

Thanks,
Mark

Mark Magennis
Tel: +353 (0)87 6060 162
Skype: mark.magen
LinkedIn: ie.linkedin.com/in/markmagennis
Twitter: @markmagennis