Ticket #12065 (assigned Bug)

Opened 5 years ago

Last modified 23 months ago

Form field error message should be in field's label

Reported by: rmattb Owned by: keul
Priority: minor Milestone: 4.x
Component: Archetypes Version: 4.2
Keywords: accessibility Cc: rmattb, keul

Description (last modified by rmattb) (diff)

Issue:

The form field label for assistive technologies (such as screen readers) needs to include the field error message (which can also function as contextual help, div class="fieldErrorBox").

Recommendation:

Include the field error message (div class="fieldErrorBox") within the label tag.

Implementation:

This issue is not fixed by the example implementation of #11387; the error message is farther down in the template.

Archetypes trunk is at https://dev.plone.org/archetypes/browser/Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/field.pt , but which previous versions of Archetypes need to be updated?

Change History

comment:1 Changed 5 years ago by rmattb

  • Description modified (diff)
  • Summary changed from Form field description is not in label to Form field error message is not in label

comment:2 Changed 5 years ago by rmattb

  • Description modified (diff)

comment:3 Changed 5 years ago by rmattb

  • Summary changed from Form field error message is not in label to Form field error message should be in label

comment:4 Changed 5 years ago by rmattb

  • Cc rmattb added

comment:5 Changed 5 years ago by rmattb

  • Summary changed from Form field error message should be in label to Form field error message should be in field's label

comment:6 Changed 5 years ago by rmattb

  • Description modified (diff)

comment:7 Changed 4 years ago by rmattb

  • Version set to 4.1
  • Milestone changed from 4.2 to 4.3

comment:8 Changed 4 years ago by rmattb

  • Status changed from new to confirmed

comment:9 Changed 4 years ago by rmattb

  • Milestone changed from 4.3 to 4.x

Just found https://dev.plone.org/wiki/TriagingBugs , adjusting milestone.

comment:10 Changed 4 years ago by keul

  • Owner set to keul
  • Status changed from confirmed to assigned

comment:11 Changed 4 years ago by keul

  • Cc keul added

I created a branch for this ticket:  https://github.com/plone/Products.Archetypes/tree/fix-12065

  • mainly, I moved div with errors inside the label
  • I needed spacial handling of some kind of widget (like calendar, selection and multiselection) as they don't use the shared label template.
  • I also added to the div class="fieldErrorBox" the WAI-ARIAA role="alert" attribute (not required, but why not?)

Now problems

Changes there display the error message as a label (so: in bold) and this is ugly. Fixing this forced me to change both ploneclassic and sunburst themes (BTW: this is hell! Why all CSS have been moved away from CMFPlone?!).

I created two branches for both themes:

Pull requests:

comment:12 Changed 3 years ago by keul

This issue is still pending but meanwhile I learned something new about the use of WAI-ARIAA.

It the current implementation is "too risky" why don't include the aria-describedby attribute and leave formHelp DIV as they are?

 http://www.w3.org/TR/wai-aria/states_and_properties#aria-describedby

comment:13 Changed 3 years ago by keul

  • Version changed from 4.1 to 4.2

comment:14 Changed 3 years ago by rmattb

ARIA (now included in HTML5) is a good direction for the future, but at the present, most users of assistive technologies don't yet have the tools to benefit from it, and would degrade to the current implementation. For example, screen reader upgrades can commonly cost hundreds of dollars, and many users have to wait for upgrades to be budgeted and scheduled by their IT organizations.

comment:15 Changed 3 years ago by keul

Absolutely. However the ARIAA changes are very cheap and simple to implement (and I see no risks at all), while the HTML changes I implemented for this issue are more "dangerous".

The final target of this ticket must be original scope: make it accessible also for old technology, but meanwhile... :)

comment:16 Changed 2 years ago by keul

Subordinate pull requests in themes have been merged a lot of time ago.

This is open still. I know that Archetypes will not be the main form framework for Plone 5 contents, but it will be used again and again.

Any comment?

comment:17 Changed 23 months ago by keul

The pull request has been closed without merging, I think this can be closed also as "wontfix"

Last edited 23 months ago by keul (previous) (diff)
Note: See TracTickets for help on using tickets.