Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow up of: #2509268: Inline errors repeated on child elements in module uninstall form.
Drupal 8 introduced the Table form element, see: https://www.drupal.org/node/1876710.
Although not used in core, potentially we can have multiple tables in a form, and the table is not always at the top of the page. So Tables should support Inline Form Errors, otherwise accessibility is as bad as it was without IFE enabled.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2848307-reproduced.png | 14.76 KB | alexdmccabe |
#3 | 2848307-unable-to-reproduce.png | 20.61 KB | alexdmccabe |
Comments
Comment #2
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedTag clean up: "accessibility" is the preferred one. The "a11y" tag doesn't have many issues so I'm moving them all to "accessibility".
Comment #3
alexdmccabeI took a look at this, and I wasn't able to reproduce it, I don't think. Am I missing something?
Comment #4
dmsmidtThanks for checking this out, I'm not 100% sure on which element you triggered the error, but from the image it looks like the three errors are for required fields.
In that case the errors are set against the elements inside the table and not the table it self. This issue is about the case that the errors are set on the table element, not on the children.
Checkout comment #2509268-55: Inline errors repeated on child elements in module uninstall form, the patch attached wasn't used because it was overkill. But maybe it is an starting point for the table element in general.
Comment #5
alexdmccabeI see, so the table itself should have the error, I thought the issue was that child elements would not show inline errors properly.
I added a details element with a single textfield element in it for comparison, and I kept a single textfield with no parent, also for comparison's sake. I am triggering errors on the lone textfield, the table element, and the details element.
So that's the issue, it should be working like the details element does?
Comment #6
dmsmidtIndeed, an error above the table would be the way to go I think (like we do for details).
Normally we show the error below an element, but for grouping elements we seem to have settled on showing them at the top.
I think we have a problem in cases that a table has no label/title, in that case we can't create a fragment link in the summary (#933004: Test that all form elements have a title for accessibility).
But let's start without worrying about that.
Comment #19
mgiffordTagging for https://www.w3.org/WAI/WCAG21/Understanding/error-identification.html