As a blind screen reader user, you cannot know which form fields you must fill in to add a new field or share (re-use) an existing one. For a screen reader user, no one of the form fields is mandatory (but they are).

Comments

Berdir’s picture

nils.destoop’s picture

Component: field system » field_ui.module
Priority: Major » Normal

Moving to field_ui module.

Add / re-use is indeed not marked as required. It's not really required. It's only required when you start using those form elements.
If you click save, without entering / selecting something. The form will submit, and save the weights.

If you select a field type, then the other fields become required. I don't see how we can fix this for screen readers.

Don't think this should be a major issue.

falcon03’s picture

@zuuperman: generally, when a form field is mandatory, a blind user see an asterisk (*) next to the form field label. In addition to this, required form fields are marked as mandatory using HTML 5 attributes.

A drupal novice, in fact, could think that selecting a field type and eventually a widget is enough to add a new field, when it's not. So we need a way to figure out how we can let users know that "label", "field type" and "widget" are required to add a new field or re-use an existing one.

CB’s picture

Agreed. There needs to be a clear understanding about what is required and what is not. Whether for a screen reader user or not.

Anonymous’s picture

Would a simple text change, "*label" for example, be enough?

falcon03’s picture

IMO the most logical way to do this would be to set the #required property on our form items to add a new field or share an existing one.

But I don't know if this will let us distinguish mandatory form fields to add a new field and mandatory fields to share an existing one...

CB’s picture

The problem is that those fields are conditional. So, they're not required unless one of them is changed. Not sure if we could still use #required in that instance, could we?

falcon03’s picture

@Christian Biggins: I don't know very much the Form API, so I cannot answer to your question. But at this time, since they are conditional, I wonder if we could show/hide them dynamically using the States API...

Maybe this could imply redesigning a bit the Field UI, but I think that not only blind user would benefit from this...

Berdir’s picture

The only way that I can think of to solve this would be to get completely rid of these embedded forms and add standard "+ Add field" and "+ Add existing field" action links at the top of the page and only use the existing form to re-order the fields.

We do have 2 required follow-up steps anyway and we could use ajax to load the field type settings based on the selection to not add another one.

Maybe that will happen anyway in the Field API to CMI conversion anyway, I don't know

nils.destoop’s picture

Moving "add field" and "add existing field" to modals, is one of the things that is beïng discussed #1770720: [META] Gradual changes to Field UI

See http://drupal.org/node/1770720#comment-6480786

Anonymous’s picture

The problem is that those fields are conditional. So, they're not required unless one of them is changed. Not sure if we could still use #required in that instance, could we?

Maybe invent a #required_if that is given a callback which returns a boolean? The #required_if UI would present the user with a # character (or some other character) instead of a * character if it is present and give an error if #required is also present.

CB’s picture

That is a fantastic idea and could just work with the great jQuery validate plugin.

falcon03’s picture

@earnie: what about wrapping the forms to add/re-use a field into modals? This should let us use the #required attribute for the form fields, shouldn't it?

I am very concerned about creating the #required_if form attribute,. Most blind users are not familiar with an approach which involves using a "#" after the form label; in addition to this, now "required" form fields can be enforced through HTML 5, and that's a great thing. Introducing this new approach can be very confusing for blind users...

falcon03’s picture

Status: Active » Closed (duplicate)

Closing this issue as a duplicate of
#1963340: Change field UI so that adding a field is a separate task
since it will fix this issue as well. If adding a new field or sharing an existing field become separate tasks, it will be a piece of cake to mark form fields as required using #required.