WIP: Accessibility issue with "Add to cart" and "Products Filter" element

Getting Red Flag form all accessibility checkers

Add to cart : Since element use form, “Add To Cart” button must be <button type="submit"> instead of <a> tag.
Product Filter : Radio buttons or check boxes with the same name attribute must be contained within a <fieldset> element. Bricks use <ul>

Hey @minthaik,

I guess you need to update the message, as I don’t see it fully :slight_smile: That’s what I see:

If you paste the code, please use code block, will be easier to read.

Thanks,
Matej

Thanks @Matej . Updated

Hey @minthaik,

so, I’ve checked the “Add to cart” element, and checked the frontend in my install, and on my install, it’s a <button> element.
Can you let me know where you test it? I’ve tested it on single product page.

About the second one, I see. I gues if we would use aria-labelledby, that would give the same result, right?

Matej

I’m on 1.12 beta. It’s showing as a tag.


Hi @minthaik,

thanks. I was able to reproduce it in a loop. I also check “Storefront” theme, and there is also a tag, but because there is no quantity selector. So, if you want, you can disable quantity selector (from settings), and there will be no form, so a tag is ok.

Anyway, I’ve created an internal report about this.

Thanks,
Matej

Thanks @Matej . I still need quantity field. It also have problem in single product template as well, if I use this element.

HI @minthaik,

yeah, this was kind of a workaround, if you want to remove this accessibility issue. :slight_smile: But then you don’t have a quantity selector…

Anyway, it happens in the “Single product template”, but only in a loop, right?

Matej

Hi @Matej ,

Working fine on single product. It only happen on loop and additionally happing on “Related Products” element as well. Hopefully fix on final 1.12.

Yep, that’s what I noticed as well, thanks for confirming. It’s a tag as soon as it’s inside the loop.

Matej.