Drop down list produces duplicate HTML element IDs | Community
Skip to main content
New Participant
October 9, 2019
Solved

Drop down list produces duplicate HTML element IDs

  • October 9, 2019
  • 1 reply
  • 1020 views

When OOTB drop down list component renders its options into the HTML markup, it outputs an ID "emtyValue" on the first element. This ID is static, and if the drop-down list component is used 2 or more times in the same form, this ID is duplicate. This is raised in the accessibility validation checks. Any suggestion?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mayank_Gandhi

Hi,

This has been discussed with Engineering in the past and it was confirmed that this element is just there for providing an empty first value to the dropdown. This would have caused a problem when the same dropdown has multiple options with the same id and not when different dropdowns have an empty hidden option with the same id. When tested with screenreader this caused no issue.  You can leave the emptyValue id as is.

1 reply

Mayank_Gandhi
Mayank_GandhiAccepted solution
Employee
October 9, 2019

Hi,

This has been discussed with Engineering in the past and it was confirmed that this element is just there for providing an empty first value to the dropdown. This would have caused a problem when the same dropdown has multiple options with the same id and not when different dropdowns have an empty hidden option with the same id. When tested with screenreader this caused no issue.  You can leave the emptyValue id as is.