Open tisto opened 3 years ago
@iFlameing pls document this behavior of semantic ui properly.
@tisto I found that the ids present because of what we are doing in our widgets. It has nothing to do with semantic UI.
If we don't provide fieldSet
props to the widget then Form.Field
(which is a div) gets the same id as labels. You can see this by visiting these two links.
https://github.com/plone/volto/blob/master/src/components/manage/Widgets/FormFieldWrapper.jsx#L106 https://github.com/plone/volto/blob/master/src/components/manage/Widgets/FormFieldWrapper.jsx#L113
That's why axe is failing. We have two solutions we can provide fieldsets to the widget or we can modify the Volto core for using a better approach of adding an id to Form.Field
.
@iFlameing ok, then I guess we should fix this in Volto core.
@tisto created pr in volto core https://github.com/plone/volto/pull/2102
@iFlameing I added an accessiblity check to the Cypress tests (axe) that reports violations. I would like you to familiarize yourself with accessibility of forms (I send you some pointers to that already). Please make sure you understand what it takes to write accessible forms and make sure you stick to those rules and best practices. I want you to understand what you are doing before fixing those violations.