Closed (cannot reproduce)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forms system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Jun 2012 at 16:24 UTC
Updated:
29 Jul 2014 at 20:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mgiffordLooks like a useful addition. Patch applies nicely in git.
Comment #2
mgifforddrupal_theme_fieldset_aria-describedby.patch queued for re-testing.
Comment #4
liam morlandReroll.
Comment #5
mgiffordLooks good. There's an instance in core here:
admin/config/people/accounts
Weren't as many as I had expected though. Are there other good examples you've been looking at.
Any work on fieldsets should also be aware #1168246: Freedom For Fieldsets! Long Live The DETAILS.
Comment #6
liam morlandYes, I have seen the details issue. The ARIA stuff could be added to that patch or once that is committed I will write a patch like this one adding ARIA to it.
Comment #7
mgifford#4: drupal_theme_fieldset_aria-describedby.patch queued for re-testing.
Comment #9
mgiffordre-rolling to keep up with Core.
Comment #10
mgiffordSeems like a simple addition to add more semantics.
Comment #11
mgifford#9: drupal_theme_fieldset_aria-describedby-1645420-9.patch queued for re-testing.
Comment #12
sunHm. While this seems to make sense from a pure technical perspective...
...the "descriptions" that are usually output for fieldsets/details do not actually "describe" the fieldset/details. Most often, they are rather introduction texts that explain how to use the controls that are contained.
I'd understand a real description of a fieldset/details element as something like:
But that's not the case. The "descriptions" we have there are really advisory intro texts, along the lines of:
In short, "description" != "description". I'm not sure whether this makes sense.
Comment #13
liam morlandThe ARIA specification gives a broad definition for aria-describedby:
I think the use given in this patch falls within the specification.
Comment #14
liam morlandComment #15
webchickCommitted and pushed to 8.x. Thanks!
Comment #16
sunAttached patch fixes various problems with the committed patch.
Comment #18
liam morland#16: drupal8.aria-fieldset.16.patch queued for re-testing.
Comment #19
mgifford@sun this applies nicely & provides the same results in the HTML .
This looks like a good improvement on the earlier patch.
Comment #20
mgiffordApparently we should be careful with aria-describedby. It crashes the browser in IE8+some versions of Jaws if target has more that 1024 characters of content.
Something funny with how Jaws does aria-describedby that causes memory issues that lead to crash situation.
Comment #21
liam morlandI hate having to work around crap like this. This version of the patch only generates @aria-describedby if the #description is <= 1024 characters.
Comment #22
liam morlandIs it only IE8? If so, perhaps we should just expect JAWS users to upgrade their IE.
Comment #23
mgifford#21: drupal8_aria-fieldset_1645420.patch queued for re-testing.
Comment #25
mgiffordRerolling the patch!
Comment #26
liam morlandThanks.
Comment #27
sunWell, I think that JAWS/IE is actually right in breaking badly on a too long description. Circles back into what I already said before: Our #description values do not contain the appropriate content for this aria-describedby reference.
But anyway, let's move forward with this.
Comment #28
mgiffordI'm going to set this back to needs review to verify that it doesn't crash IE8 for JAWS users.
Sun, thanks for restating your concerns. I do take them seriously and am reaching out to see if I can get a few more opinions.
Comment #29
nitinzd1985 commenteddrupal_theme_fieldset_aria-describedby.patch queued for re-testing.
Comment #30
mgifford#25: drupal8_aria-fieldset_1645420-24.patch queued for re-testing.
Comment #31
mgifford@webchick, I am tagging this "RTBC Feb 18" as it has been ready, but just been really hard to find a Jaws user to test this patch. Otherwise it works as described.
Remove if required.
Comment #32
davidmacdonald commentedI have looked at the aria-describedby code... It is correct when a form field is created. I have tested it with NVDA 12 and Firefox 14 and it reads ok.
Comment #33
catchIs there a bug report we could link to for the JAWS issue?
Comment #34
mgiffordI've never seen one for JAWS. Other screen readers do:
http://code.google.com/p/google-axs-chrome/issues/list
http://www.nvda-project.org/wiki/Development#IssueTracker
Closest I could find in JAWS (or VoiceOver) was:
http://stackoverflow.com/questions/tagged/voiceover
http://stackoverflow.com/questions/tagged/jaws
So, no. @catch I don't think there's anything we can file a bug report with.
Comment #35
mgifford#25: drupal8_aria-fieldset_1645420-24.patch queued for re-testing.
Comment #36
mgiffordInterdiff between @Liam Morland's patch in 21 & mine in 25.
Comment #37
mgifford#25: drupal8_aria-fieldset_1645420-24.patch queued for re-testing.
Comment #38
mparker17#25: drupal8_aria-fieldset_1645420-24.patch queued for re-testing.
Comment #39
mparker17Testing.
Comment #40
mparker17I had difficulty testing this one manually because most of the things that were fieldsets in D7 are now "details" in D8. Yay HTML5!
Here's how I managed to find a fieldset:
drush -y en languages).Home > Administration > Configuration > Regional and language(admin/config/regional/language), and add a language.search/nodeand expandAdvanced search.But, no core fieldsets have descriptions, apparently, so you'll have to hack
node.modulein functionnode_form_search_form_alterand add one if you want to see the patch in action.Comment #41
mparker17Due to the problems described here, http://api.drupal.org/comment/49228#comment-49228 , I've had to re-roll the patch so the ID on the description is output.
Comment #43
mparker17I could swear I tested that before I wrote the patch... :P
Comment #44
mparker17Lets try this again!
Comment #45
mgiffordThis is good to go I think. Here's a screenshot from admin/config/people/accounts

Comment #46
mgiffordWoops - @mparker17 just reached out on Skype to inform me that the "screenshot you posted demonstrated an aria described-by attribute on a form-control, not aria described-by attribtue to description elements on *fieldsets*"
Back to Needs Review. I was going back to examples in #5 after walking through the steps in #40 & not wanting to "hack node.module in function node_form_search_form_alter ... to see the patch in action."
Comment #47
mgifford#44: drupal-aria-describedby-for-fieldset-desc-1645420-44.patch queued for re-testing.
Comment #48
mgifford#44: drupal-aria-describedby-for-fieldset-desc-1645420-44.patch queued for re-testing.
Comment #49
mgifford#44: drupal-aria-describedby-for-fieldset-desc-1645420-44.patch queued for re-testing.
Comment #50.0
(not verified) commentedadding links.
Comment #51
mgiffordAdding the tags back in here.
Comment #52
mgifford44: drupal-aria-describedby-for-fieldset-desc-1645420-44.patch queued for re-testing.
Comment #53
mparker1744: drupal-aria-describedby-for-fieldset-desc-1645420-44.patch queued for re-testing.
Comment #54
mparker17Rats, the patch doesn't apply anymore. I'll re-roll it.
Comment #55
mparker17Apparently testbot had a hiccup and didn't apply the patches the first time :P
Comment #56
mgiffordNow we just need to deal with #46 and providing relevant examples.
Perhaps from admin/config/people/accounts
Comment #57
mparker17@mgifford I wasn't actually able to find a
<fieldset>on that page when I tested the latest patch (in #44) last night... pretty much everything that used to be a<fieldset>is now a<details>element.I spent a bit of time looking for fieldsets, but got distracted by dinner and being super-tired from a long week.
I don't know anything about the Form API's change from generally-using-
<fieldset>s to generally-using-<details>, so I cannot tell if testing for #44's changes on a<details>element will produce a outcome relevant to this issue.FWIW, when I tested last night, the
<details>elements onadmin/config/people/accountshadaria-describedbyattributes, but there weren't correspondingidattributes in the page's HTML.Comment #58
mparker17Marking as "Needs issue summary update" since that would be really handy.
Here are the remaining tasks:
<details>elements as well, or whether we should file a separate issue for that.Comment #59
mgiffordThey are easy to find on the user page with this patch here:
https://drupal.org/node/504962
This wraps all radios & checkboxes in the fieldset.
Comment #60
mparker17Actually, tagging as "Novice", since the issue summary update and steps 1 and 2 should be pretty simple.
Comment #61
mparker17This change record might be a good place to start researching: All collapsible fieldsets have been replaced with HTML5 details elements.
Comment #62
mgifford44: drupal-aria-describedby-for-fieldset-desc-1645420-44.patch queued for re-testing.
Comment #63
sunThis will need a re-roll after #2152209: Convert theme_fieldset() to Twig has landed.
Is the situation with that JAWS bug for descriptions longer than 1024 characters still the same today, or can we remove that adjustment?
I wonder whether it would make sense to move the follow-up patch into a new issue? The original patch was committed ~1 year ago already, and my original follow-up patch was meant to be committed as a super-quick follow-up only. Then we suddenly ran into that JAWS bug...
@mgifford or someone else: Could we create a meta issue for all (Form API related) accessibility issues that need to be resolved before beta/release? — A concrete overview (via parent issue link relationships) would be very helpful to have.
Comment #64
mgiffordLooks like this might have been resolved in JAWS 14.0.1823 (April 2013) - http://www.freedomscientific.com/downloads/jaws/JAWS14-previous-enhancem...
This will still affect some users, but I think it might be alright to remove the adjustment. Partly this will depend on D8's lifecycle.
I've created an meta issue #2203649: Remaining Open Form API related Accessibility Issues - don't think I missed anything, but if so please edit it.
Comment #65
mgiffordComment #66
mgiffordWhat happened to theme_fieldset() anyway? Not sure how to re-write this patch.
Comment #67
rocketeerbkw commentedUpdating this issue with task instructions in preparation for the sprints at Drupalcon austin.
Comment #68
jdillick commentedHi, working from mentored code sprints at Drupalcon Austin. I'm going to see if the patch needs to be rerolled.
Comment #69
jdillick commentedComment #70
jdillick commentedOk, not sure if anything needs to be done on this issue. Attached is a screen shot of a fieldset with a description from the site branding block configuration at /admin/structure/block/add/system_branding_block/bartik
aria-describedby attribute is added in template_preprocess_fieldset() in core/includes/form.inc.
It doesn't look like the patch needs a reroll. Does core already address the issue?
John
Comment #71
jdillick commentedComment #72
jdillick commentedComment #73
jdillick commentedComment #74
mgiffordLooks like it's fixed now in Core I couldn't replicate the problem on a fresh install.
Comment #75
liam morland