The javascript trick might save many users one click, but without also having a submit button, the html form is broken and it is totally nonfunctional and not accessible for other users.

Comments

c-logemann’s picture

Version: 6.x-1.13 » 7.x-1.0-rc5
Assigned: Unassigned » c-logemann
Priority: Normal » Major
Issue tags: -JavaScript, -create +Accessibility

I just found the same problem by testing this module for my customer.
This a very bad accessibility situation.
Currently there is a hard coded "display: none;" CSS style in the form.
There should be an admin option and a fallback strategy for users without JS.
I will provide a patch as soon as possible.

c-logemann’s picture

Title: node create form (id "node-form") missing submit button » accessibility problem with hiding of "next" button in node form
Version: 7.x-1.0-rc5 » 7.x-1.x-dev
Assigned: c-logemann » Unassigned
Status: Active » Needs review
StatusFileSize
new1.83 KB

Patch with an option to disable the hiding of the button.
The hiding itself is now realised with a javascript that adds the accesible system class "element-invisible" to the next button in the node form.
This is currently for drupal 7 and can be backported if someone is interrested in.

mgifford’s picture

Any reason not to use '#title_display' => 'invisible', as per:

http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht...

c-logemann’s picture

1. #title_display may help to be accessible with screenreaders but the problem is also with browsers without available javascript.
2. #title_display is for hiding the title of a form element but not for hiding a button.

mgifford’s picture

Good reasons. Although other than Lynx, what browser doesn't come with Javascript?

I can see that some individuals (or possibly institutions) might turn off Javascript, but the vast majority of screen-readers operate on the DOM & so it's not not a problem.

So you need to hide the entire checkbox I assume.

c-logemann’s picture

Updated patch. The new JS-File was missing.

> So you need to hide the entire checkbox I assume.
How do you mean this? My patch is adding a system CSS class with JS to the button element which is for hiding in screen reader compatible way.
And because of JS this solution is working when JS is off or not available.

I think talking about majorities is not good especially when it's easy to help lot's of minority users. The drupal core itself and many contrib modules I know are working without JS. They are just doing only a progressive enhancement with javascript and that is a good strategy in my opinion and one of the reasons why I love drupal.

#edit: Additional Informations about "Accessibility best practices" and especially the class "element-invisible".

mgifford’s picture

I do totally agree with progressive enhancement as an approach. That being said, javascript doesn't cause accessibility issues like it once did.

I've had no need to use this module. I don't have an example where this is used. To test the patch and what it does I need to replicate it. I've just scanned the code and am providing comments.

I was a bit surprised to see that the accessibility best practices documentation wasn't one that I'd edited. I've been involved with most. @Everett Zufelt's done a great job describing the CSS class element-invisible. I was definitely slogging along on that issue queue with him. Quite familiar with it.

Anyways, I'm not saying that your approach is wrong. I'm just asking questions & based on scanning the code.

I'm pretty much always in favour of nixing 'display: none;' for something else.

c-logemann’s picture

@mgifford: Yes maybe the JS Problems are reduced because of modern screen readers but I think we should be as accessible as possible especially if it's easy to be.

For everyone who wants to help testing: Just install the module in a test drupal system and activate. There will be a new node type "biblio". Try to create biblio nodes with and without activated JS with and without my patch.

rjerome’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -Accessibility

Automatically closed -- issue fixed for 2 weeks with no activity.