Duplicate IDs from select elements of related products
-
Related (variable) products on the product page have the same attribute select IDs (#strength, in my case). As we know, on a given page, the “id” attributes are supposed to be unique. This has been a minor issue for a long time, so I’m finally looking to change it. It doesn’t interfere with any custom JavaScript, but it does affect the accessibility metrics on Lighthouse (non-unique ARIA IDs).
The best solution I’ve come up with is to give the frontend select tags the id “attributeName-productId”, like
id="strength-1068"
. If absolutely necessary, variable product attribute IDs can then be targeted with regex selectors.Can we implement some sort of solution to this issue?
The page I need help with: [log in to see the link]
- The topic ‘Duplicate IDs from select elements of related products’ is closed to new replies.