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.
I was using WebAIM's Firefox plugin to evaluate a bunch of admin pages in Drupal.
All have problems with missing labels:
admin/structure/types/manage/article/comment/display
admin/structure/types/manage/article/comment/fields
admin/structure/types/manage/article/display
admin/structure/types/manage/article/fields
This is usually pretty easy to add, but it is time consuming to go in and add in the titles and ensure they describe the field in a meaningful way.
Comment | File | Size | Author |
---|---|---|---|
#121 | drupal.labels.121.patch | 35.43 KB | sun |
#119 | 882694-118-add-labels.patch | 35.7 KB | yched |
#113 | 882694-113-add-labels.patch | 33.63 KB | ksenzee |
#107 | 882694-107-add-labels.patch | 31.1 KB | ksenzee |
#101 | drupal.labels.101.patch | 29.93 KB | sun |
Comments
Comment #1
Everett Zufelt CreditAttribution: Everett Zufelt commentedIf there is no label or name (see resource below) for these controls then this issue should be marked as a critical bug.
Resource:
Name, Role, Value: WCAG 2.0 success criteria 4.1.2 priority A
http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html
Comment #2
mgiffordThere are no labels associated with these elements.
As a quick afterthought. These labels can be added at any time. There's no reason to stop a release to add these. It has no UI changes so should simply be a technicality that is identified & corrected.
It needs to be fixed. But I don't know that it should be marked critical if it is assumed it will be brought into core quickly.
Comment #3
Everett Zufelt CreditAttribution: Everett Zufelt commented@mgifford
I don't want to assume that something can be brought into core after 7 is released without documentation. Marking as critical for now. Would be happy to set back to normal if confirmation can be provided by someone that this change can be made after release.
Comment #4
Bojhan CreditAttribution: Bojhan commentedStrange is this in CCK then too?
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedsub
Comment #6
andypostthis could be fixed while beta stage
Comment #7
andypostdelComment #8
mgiffordI was just starting going through the site with this Firefox plugin - http://wave.webaim.org/toolbar
Labels are missing all over the admin interface. However the good news is that it really should present no problems to find & insert descriptive text to resolve this problem.
If there's a commitment to find & get labels properly identified I think we're fine. There are a lot more that we need to find.
Comment #9
andypost@mgifford we need native english speaker for wording of labels
Comment #10
yched CreditAttribution: yched commentedYes, for most of those fields we don't display a label, because visually the label is the table column header. Adding actual labels above the form elements would add to much cruft.
However, for accessibility reasons, those labels should be set as #title in the form element, and simply hidden with
'#title_display' => 'invisible',
.This is what was done for all 'weight' elements used for tabledrag, in #448292: Drag and Drop for table rows is not accessible to screen-reader users. However, the Field UI screens has other form elements without a label, which need to receive the same treatment.
Has been on my TODO for a while, will try to come up with a patch soon.
Comment #11
Everett Zufelt CreditAttribution: Everett Zufelt commentedDepending on what is easier, it is just as useful to set the title attribute on the form field.
Comment #12
yched CreditAttribution: yched commentedWell, #448292: Drag and Drop for table rows is not accessible to screen-reader users went with #title + #title_display, we should stay consistent with that.
Comment #13
mgiffordUsing the title_display as per normal.
Comment #14
Jeff Burnz CreditAttribution: Jeff Burnz commentedaha, whitespace, you love them mike - pita but must go :)
Powered by Dreditor.
Comment #15
yched CreditAttribution: yched commentedThks for stepping in, mgifford.
The labels that were added by #448292: Drag and Drop for table rows is not accessible to screen-reader users include the field label :
'#title' => t('Weight for @row', array('@row' => $extra_field['label'])),
The logic is that, if you depend on a screen reader reading out input labels to navigate in a form, just reading 'Weight' gives you the column where you are in the table, but not the row, leaving you equally lost.
Also : in each row, the 'parent' form element should also get a hidden title.
Comment #16
mgifford@Jeff - Damn spaces! Thanks.
@yched I'm really not sure if adding field label is going to be useful here or not. In the case of the weights for Drag/Drop we've got a table that generally has a few form elements in it, but mostly a lot of almost identical rows where it would be rather easy to loose your place as you are navigating through it.
In most of the cases with fieldsets I've run against there is one or two that are associated with a more complex set of data. I'm not sure if adding the extra details will add much. We want to add context, but not add redundant info if we can avoid it.
So how are fieldsets being used and is there a good case for adding much more detail about how they are presented. Are the descriptions good enough? Do they need more info?
Comment #17
mgiffordSorry, realize now I missed a bunch in that last patch when I was running through and making this other version that uses titles instead of labels. Patch above still needs a bunch of work.
It's simpler generally, but makes the attributes longer and also adds in warnings for tools like WebAim that are looking for labels and alert folks about "ALERT: Unlabeled form element with title"
This isn't an accessibility problem so if folks prefer to do it with titles that's fine.
Comment #18
yched CreditAttribution: yched commentedWell, the important thing is consistency. I personnally don't have a strong nor well-informed preference, but if the 300+ comment-long #448292: Drag and Drop for table rows is not accessible to screen-reader users settled on #title + #title_dislpay = 'invisible', we should not take a different route on a whim - neither revive the lengthy debate here...
Also, the 'Manage display' screen has its own form elements without labels on *all* rows, so consistency wrt including the row name in the hidden label will be needed there too.
Comment #19
mgiffordI can certainly re-roll it with the labels instead of titles. It is more consistent.
And for clarity the 'Manage display' screen is admin/structure/types/manage/article/display
Comment #20
Everett Zufelt CreditAttribution: Everett Zufelt commented@yched
Just to clarify, the issue you point to had almost nothing to do with labeling form fields. I doubt there was ever a debate on the topic. I'm just saying there is not point in having labels. If it is easier or if you think it is more desireable for consistency then great. I personally would use the title attribute.
Comment #21
mgifford@yched, I caught the changes in Manage display in this patch, thanks.
I also reverted to using invisible labels rather than titles. In D8 when FAPI gets reworked it will be easier to simply swap this for attribute rather than invisible. However, it's really hacky doing it as I did in #17. It's just a messy way to present the info and the way I did it in this patch is much easier to see.
Comment #22
yched CreditAttribution: yched commented+++ modules/field_ui/field_ui.admin.inc 17 Aug 2010 14:59:52 -0000
@@ -227,12 +227,16 @@ function field_ui_field_overview_form($f
+ '#title' => t('Parent for !title', array('!title' => $instance['field_name'])),
(...)
+ '#title' => t('Parent for @row', array('@row' => $extra_field['label'])),
Consistency :
- '@' or '!' ?
- 'row' or 'title' ?
+++ modules/field_ui/field_ui.admin.inc 17 Aug 2010 14:59:52 -0000
@@ -373,12 +383,16 @@ function field_ui_field_overview_form($f
+ '#title' => t('Date type'),
Typo : Dat*a* - Actually, the common terminology is 'Field type' here.
+++ modules/field_ui/field_ui.admin.inc 17 Aug 2010 14:59:52 -0000
@@ -387,6 +401,8 @@ function field_ui_field_overview_form($f
+ '#title' => t('Form element'),
Terminology : 'Widget type'
+++ modules/field_ui/field_ui.admin.inc 17 Aug 2010 14:59:52 -0000
@@ -759,6 +785,8 @@ function field_ui_display_overview_form(
+ '#title' => t('Select options for !title', array('!title' => check_plain($instance['label']))),
Let's not suddenly switch to 'imperative verb' formulation.
+ Terminology
--> Should rather be : 'Label display for !title' (or @row or whatever :-)
+++ modules/field_ui/field_ui.admin.inc 17 Aug 2010 14:59:52 -0000
@@ -778,6 +806,8 @@ function field_ui_display_overview_form(
+ '#title' => t('Select formatter options for !title', array('!title' => check_plain($instance['label']))),
'Formatter for !title'
+++ modules/field_ui/field_ui.admin.inc 17 Aug 2010 14:59:52 -0000
@@ -897,6 +929,8 @@ function field_ui_display_overview_form(
+ '#title' => t('Display for !title', array('!title' => check_plain($extra_field['label']))),
'Visibility for !title'
All in all, since these labels are hidden by nature, it would possibly help to post screenshots of those 2 screens, annotated with the proposed 'hidden' labels ;-)
+ Odd display artifacts on 'Manage Fields' screen, 'add existing field' row :[edited out : those visual bugs are present in current HEAD. Never mind the attached picture. Odd]
Comment #23
Bojhan CreditAttribution: Bojhan commentedYour saying screen shots of hidden stuff? :D I am looking forward to those.
Comment #24
yched CreditAttribution: yched commentedCreated #888438: Field UI "Manage fields' visual glitch for the visual bugs mentioned in #22.
+ Setting patch back to CNW
Comment #25
yched CreditAttribution: yched commentedre @Bojhan #23 : I'm saying *annotated* screenshots :-p. If they were just regular labels, checking the consistency and relevance of the newly added labels would be easily done just looking at the page. But since we're talking about hidden labels, we currently need to browse the code or expand the various parts of the DOM in Firebug.
Comment #26
mgifford@yched - I do hope you're joking about the screen-shots. If someone wants to check I've applied it to my sandbox:
http://drupal7.dev.openconcept.ca/
Thanks for those changes. That's exactly what I needed. Very useful. I've re-rolled the patch with those changes.
Comment #27
yched CreditAttribution: yched commentedAbsolutely not joking about screenshots : how else do you get a fair overview of the UI changes addeed here ?
However, figured out that we don't need to manually annotate a screenshot : playing with the element-invisible class in firebug to unhide the labels and paint them red does the trick. Screenshots attached.
Which shows :
"Manage fields" screen :
- we don't distinguish enough the labels between 'add new' and 'add existing' rows. Figure a blind user trying to guess where he's tabbed himself into.
- 'Form element' on 'add existing field' row needs to be 'Widget type'
"Manage display" screen :
- "Select options for [row]" needs to be "Label display for [row]"
Other feedback from UX folks welcome.
Comment #28
Bojhan CreditAttribution: Bojhan commentedLooks good, I dont know wheter screenreaders dont cross link column titles. Dont want to repeat to much.
Comment #29
mgiffordThanks @yched & @Bojhan.
As far as an overview of changes, I love http://meld.sf.net for that, but it's not for everyone.
Totally a good approach to use firebug to override the invisible text and display it as red. It's a nice way to display the issue.
Your description of the screenshots also helps Everett & others understand what we're talking about. I don't usually provide enough descriptions when tossing up a screenshot.
On "'Form element' on 'add existing field' row needs to be 'Widget type'" - Totally. And it's interesting how easy it is to see this when it's visible then when it's just in the code. There is definitely value to spitting it out as a screenshot. I can certainly repatch this.
There are really times when best is the enemy of good. I don't think we're at this point yet, but there are lots and lots of little issues like this that are just hanging there. I've quickly done a number of patches to improve this, but none of us can afford to spend this much time evaluating every one of them. And what I initially proposed is much better than what is in core now. That being said, this review process is useful.
@yched - do you have any idea on how to better differentiate between "'add new' and 'add existing' rows"? I'm really not particular about exactly what text is there and your suggestions have been great thus far.
@Bojhan - as far as the table headers go, there is no worry about repeating the elements. Having descriptive labels is presently the most important piece. Although the tables could be improved by adding scope="col" as is done here:
http://webaim.org/techniques/tables/data
Having a word or two repeated in a label won't be a problem for the vast majority of users.
Comment #30
mgiffordOk, I think I've included all of the good suggestions from #27.
Comment #31
Everett Zufelt CreditAttribution: Everett Zufelt commentedLooks good.
Where placeholder is user input can you please use @placeholder instead of !placeholder?
Thanks.
Comment #32
mgifford#30: field_ui_label_v6.patch queued for re-testing.
Comment #33
mgiffordI tried modifying the patch to use @ and then applying it. This resulted in a problem so I'm just trying to apply this to see if the patch still works as is.
Comment #35
Everett Zufelt CreditAttribution: Everett Zufelt commented#30: field_ui_label_v6.patch queued for re-testing.
Comment #37
mgiffordKeeping up with core & conversion to @ from !
Comment #38
Everett Zufelt CreditAttribution: Everett Zufelt commented+1 from me. This is a pretty long patch so I'd love another person to review and RTBC.
Comment #40
mgiffordThere's something messed up in the code somewhere. I'm getting this error when it's applied:
Fatal error: Unsupported operand types in includes/form.inc on line 1546
Might be what's tripping up the bot here, but it applies nicely so it's a bad error if it is.
Someone will have to go through and figure out what's wrong.. I must have missed something..
Comment #41
Everett Zufelt CreditAttribution: Everett Zufelt commentedPerhaps someone more familiar with the inner workings of Field UI will take a look.
Comment #42
yched CreditAttribution: yched commentedThis line looks broken - results in invalid PHP :
On http://drupal.org/files/issues/screen-capture-2_3.png :
- "New field type" / "New widget type" / "Existing widget type" are wrong.
Should be :
"Type of new field" / "Widget for new field" / "Widget for existing field"
- The titles should use $instance['label'] (i.e "Image"), not $instance['field_name'] (i.e "field_image")
On http://drupal.org/files/issues/screen-capture-4_3.png :
- "Select options for [label]" should be "Label display for [label]"
Comment #43
mgiffordThanks that was great. Sorry, I forgot the + from the cutting/pasting from the previous patch.. Annoying. Least you made some other improvements!
Comment #44
mgiffordAttaching screen shots.
Comment #45
yched CreditAttribution: yched commentedLooks good to me. Pinging UX folks for string review.
Comment #46
mgiffordAll the added text is invisible, so I don't think it does need a Usability review. Just needs someone to look over it and mark it RTBC. We're just adding invisible labels after all not changing the look feel of the pages.
Comment #47
Bojhan CreditAttribution: Bojhan commented@mgifford I think he just wanted someone to do a text review. I just reviewed it - there seem to be some inconsistencies in sequencing of words but that seems rather minor.
Comment #48
mgiffordThanks! I do think that it would be good to have a document outlining the best practices for implementing hidden labels for core fields. I suspect that there are some other inconsistencies depending on when the patches were originally written.
However, these are minor issues that can be cleaned up as part of a broader review I would think.
Comment #49
Everett Zufelt CreditAttribution: Everett Zufelt commentedAgreed we need documentation. My goal for this afternoon is to document #title_display in the D7 FAPI documentation. Once we have that done we can at least have a reference for how to hide titles. ad can build out more explanatory docs from there.
Comment #50
bowersox CreditAttribution: bowersox commentedGreat work on all this labeling!
Comment #51
sunoh why oh why do I hit yet another one of this...
@-placeholders already perform a check_plain(). Please CAREFULLY read http://api.drupal.org/api/function/t/7 - thanks.
Powered by Dreditor.
Comment #52
bowersox CreditAttribution: bowersox commented@sun,
The top 4 lines in your code snippet look right to me, it is just the bottom 7 lines that need the check_plain() removed.
For example, this:
should become:
Is that correct? (Or is there anything that should change about the top 4 lines too?)
Comment #53
mgifford#43: field_ui_label_v8.patch queued for re-testing.
Comment #54
mgiffordI think field_ui_label_v8.patch also needs to be updated to keep up with head when applying it I get 8 out of 19 hunks FAILED. Thought I'd re-test it to verify.
@sun, thanks for the @-placeholders note. Sorry I missed that.
Comment #56
sunPlease merge in the patches from
#883850: Missing Labels with User Administration (Select & Checkbox)
#885930: Labels missing for simpletest page
#883816: Label missing for checkbox in menu's overview table
#885876: Label needed to create new actions
#851174: Update options checkbox doesn't include labels
#884932: Labels missing for search admin pages
#883822: Labels missing from Trigger Admin Forms
#885946: Image file upload lacks labels
Comment #57
Everett Zufelt CreditAttribution: Everett Zufelt commentedAnd also
#827906: Adds #title and #title_display to the weight columns of all tabledrag elements in core
Comment #58
Bojhan CreditAttribution: Bojhan commented<webchick> And yes, I agree with one mega patch. Easier to review and commit.
Comment #59
Everett Zufelt CreditAttribution: Everett Zufelt commentedSetting critical as per @webchick on irc.
Comment #60
Dries CreditAttribution: Dries commentedWe're reaching a point where we need to seriously ask ourselves whether patches like this are truly critical, or whether they can wait to D8. While important, I'm not convinced that this patch should be an absolute release blocker.
Comment #61
webchickWell, the reason I feel it's critical is because it affects our WCAG compliance, which was given a huge push in D7. There are people actively prevented from using forms in Drupal atm because of this issue, which seems wrong to me. Drupal 7 should be for everyone, and Mike, Everett, Cliff, and the rest of the accessibility team have put in tremendous strides to see that happen.
This differentiates this particular patch from something like #925844: Tabledrag 'Show row weights' link needs to be larger in Seven in my mind, which is one user using one program having trouble finding one link. The patch that actually added that link on the page though was a critlcal accessibility bug fix. That's where the boundary is in my mind.
However, you could make the argument that several accessibility tests have been performed "in the field" with people without this issue being fixed and them not having a problem (or at least a documented one) getting around, and that draw conclusions from that that full WCAG compliance is an academic exercise we could push to D8.
I don't feel expert enough to make a call either way, so I deferred to the a11y team who've said this is important. Obviously, your call to make, Dries.
Comment #62
Everett Zufelt CreditAttribution: Everett Zufelt commentedThe reason that we rely on WCAG 2.0 priority levels is so that we do not have to make a determination for each issue as to how it might impact potential users. WCAG 2.0 states that all form fields must have an accessible name, provided normally through a programmatically associated label or a title attribute, this is a priority A success criteria.
I can tell you that for some screen-reader users it is very difficult to use forms when accessible names are not provided for form fields. It can also be more difficult for voice command users to use forms when there are no accessible names (I witnessed this last night when a user of Dragon Naturally Speaking was using the D7 admin interface).
Can I give an example where any of the above issues would make any particular functionality completely impossible for any particular set of users, no. Do I trust that the time and effort that went into preparing WCAG 2.0 means that we should trust the expert guidance of that document, yes. Meeting level AAA success criteria might sometimes be an "academic exercise", possibly even level AA, but the level A criteria are the most fundamental and important to accessibility, as determined by the W3c.
*****
The Success Criteria were assigned to one of the three levels of conformance by the working group after taking into consideration a wide range of interacting
issues. Some of the common factors evaluated when setting the level included:
• whether the Success Criterion is essential (in other words, if the Success Criterion isn't met, then even assistive technology can't make content accessible)
• whether it is possible to satisfy the Success Criterion for all Web sites and types of content that the Success Criteria would apply to (e.g., different
topics, types of content, types of Web technology)
• whether the Success Criterion requires skills that could reasonably be achieved by the content creators (that is, the knowledge and skill to meet the
Success Criteria could be acquired in a week's training or less)
• whether the Success Criterion would impose limits on the "look & feel" and/or function of the Web page. (limits on function, presentation, freedom of
expression, design or aesthetic that the Success Criteria might place on authors)
• whether there are no workarounds if the Success Criteria is not met
Comment #63
bleen CreditAttribution: bleen commentedThis patch is a reroll of #43 with the check_plain issue dealt with (from #51)
Additionally, this combines all the patches listed in #56 & #57 (except for #885946: Image file upload lacks labels because there is no patch there and #884932: Labels missing for search admin pages because it appears the patch there has been committed somewhere along the line)
Comment #64
Dries CreditAttribution: Dries commentedAccessibility is obviously important and I'm both happy and proud that we made so many accessibility improvements in Drupal 7. I care about accessibility.
The reason I'm not convinced this is critical is because the form is most likely still usable without those labels -- it is just harder to use. Many parts of Drupal are hard to use -- we have a lot of usability and accessibility work to do. The point is that we're beyond the point where we should treat usability problems as critical bugs.
Comment #66
Everett Zufelt CreditAttribution: Everett Zufelt commented@dries
Almost everyone in the accessibility community understands WCAG A success criteria as critical as 'must' criteria. But, you are the boss. I am incredibly disappointed in the community for this decision.
Comment #67
verbosity CreditAttribution: verbosity commentedI'm a developer to whom accessibility is incredibly important, and a vital issue on some of the sites I work on. I have to agree with everett, simply put we should make the level A criteria.
not meeting accessibility criteria for such basic UI such as forms should not be acceptable. I feel that this should be critical, and be done now. How much better for it be for Drupal to be able to say that it meets such criteria out of the box?
Comment #68
Everett Zufelt CreditAttribution: Everett Zufelt commented@Dries wrote:
The reason I'm not convinced this is critical is because the form is most likely still usable without those labels -- it is just harder to use. Many parts
of Drupal are hard to use -- we have a lot of usability and accessibility work to do. The point is that we're beyond the point where we should treat usability
problems as critical bugs.
---
I don't necessarily disagree with this, but the differentiation we can make is that some UIs are poorly usable for all (sucky but that's the way it is for now), accessibility is an attempt to make sure the UIs don't suck any extra for those with disabilities than they do for everyone else. Creating an unnecessary barrier to access for a certain segment of users is, IMO, not acceptable, and is not in alignment with our community's ideals and values.
Comment #69
Jeff Burnz CreditAttribution: Jeff Burnz commentedI can see both points of view, however at some point we have to concede that D7 is as good as we can get it. There are many bugs and issues in all software and while we can strive for perfection, its simply not attainable. For example there are many sucky things for sighted users also - and we're talking major wtf experiences that are not considered critical - for example Overlay can fail to load in many situations (path and domain prefix for languages, or even just using Garland will cause Overlay to fail in many instances).
So while it does suck we can't get everything fixed right now, we do have to take a deep breath and say enough is enough, lets fix things in D8 (with renewed energy and enthusiasm). D7 has been a huge learning curve for all of us I believe, and certainly for D8 we'll go into it much better organized, with a much clearer vision of what needs to be achieved.
Comment #70
Everett Zufelt CreditAttribution: Everett Zufelt commented@Jeff
Can you provide one example of a sucky thing where persons without disabilities have a worse experience than those with disabilities
Comment #71
Jeff Burnz CreditAttribution: Jeff Burnz commentedI can't do that Everett because I am not physically disabled, therefor I can never fully empathize with an individuals personal physical challenges or their experience using Drupal. What I do know is that there are significant challenges for all users, at many different levels and not all of these will be addressed in Drupal 7.
That said Everett, yes I can actually provide multiple examples - Bartiks broken header can render menu items invisible (but accessible via keyboard), Vertical tabs in RTL are totally unusable for sighted users, Toolbar in RTL provides significant challenges for the sighted - I can go on and on Everett. Only the Vertical tabs in RTL is a critical issue because Drupal is unusable, however there are many other issues that simply make Drupal harder to use that are not deemed critical.
Comment #72
webchickWell, I guess my big question is if this is a WCAG level A compliance thing, why on earth is it surfacing August/September 2010 and not a year ago when making these kinds of invasive changes would've been easier to sell?
Comment #73
Jeff Burnz CreditAttribution: Jeff Burnz commentedI can answer #72 quite easily - mainly because we're few in the accessibility team and we attacked the big hard issues first, which took a long time to fix. Also in the beginning we were not as well organized as we are now - so it was all a bit ad hoc rather than a clear list of issues we needed to address. In short we were learning Drupal accessibility as we went. I think for D8 we will be much better organized and have a very clear list of goals and how to execute them.
Comment #74
sunThis patch can be easily and happily backported at a later point in time, as the element labels are not visible. However, the proper fix for D8 is to additionally require a non-empty #title for all form elements via form_builder(), throwing an exception or error message if one without is encountered, so as to ensure that every form is accessible.
EDIT: That is, because Form API is not able to throw a form validation error for a form element without #title. You simply see the same form, without any error message.
Comment #75
Everett Zufelt CreditAttribution: Everett Zufelt commented@Sun
1. Please let's allow Dries to make the call on this issue being D7 critical or not.
2. Your suggestion for throwing an error on a missing #title property is great, and should be a separate issue from this issue.
Comment #76
bowersox CreditAttribution: bowersox commentedI vote for D7. There is not much down-side to committing this patch. It is very low-risk. There are no UI or strings changes. All the form label changes are set to
'#title_display' => 'invisible'
. There is little risk but a lot to gain for a subset of users who need these labels to use Drupal.The burden falls on the a11y team rolling this mega-patch to review and test until we have a solid patch. If we can do that before D7 is released, I think it's reasonable to commit this patch.
Comment #77
Everett Zufelt CreditAttribution: Everett Zufelt commented@brandon
Not to be 'that guy', but the burden should be on the UI developers who developed the broken UIs in the first place, not the accessibility folk to go in and clean up afterward.
Comment #78
mgiffordIt's a big change to how things are done in Drupal. There are a huge number of labels which will need to be applied. However, as Brandon says, this is very low-risk stuff. There's a lot of it, and I think we'll need to keep finding/fixing places where it is missed after D7 is released.
However, like other issues, I expect that these will work their way into maintenance & security releases within D7's lifetime. I've found a bunch of places where labels are missing, however I haven't done a comprehensive review. All I did to find them was work with my sandbox and apply the WebAim WAVE Toolbar to the admin side. I don't think I'd even known about this tool before August, but it's a great addition to testing previously awkward places.
There is no way that we will have found all of the missing labels with the effort that I did in August.
Comment #79
ksenzeeI'll make a stab at getting the tests to pass.
Comment #80
ksenzeeI have no idea if my fixes a) solve any accessibility problems, or b) will make the tests pass. But here they are anyway.
Comment #81
sun1) #title_display should unconditionally default to 'invisible'.
2) !empty() is sufficient as condition for $title.
3) else doesn't adhere to coding standards. Could also be omitted by defining $title = ''; before the if.
mmm
(and elsewhere) For translation's sake, we should standardize on "Weight for @title".
Duplicate definition.
Please revert any unnecessary changes from this patch (like moving #attributes and #title_display in these examples)
(and elsewhere) Trailing white-space.
Powered by Dreditor.
Comment #82
ksenzeeI am rerolling this tonight and will have it tomorrow.
Comment #83
ksenzeeThis includes all of sun's feedback, I think. Let's see if it passes.
Comment #85
ksenzeeOops - that was a git formatted patch. Try this one.
Comment #87
Dries CreditAttribution: Dries commentedI think this is a major bug, not a critical bug. It would be a shame not to fix this before Drupal 7.0 is released, but at the end of the day, it shouldn't hold back the Drupal 7.0 release. As sun wrote, this patch can be easily and happily backported at a later point in time. If you keep working on it, it should land long before Drupal 7.0 is released. I promise to keep it on my radar.
Comment #88
mgifford@Dries, I'm happy with http://drupal.org/node/927792#comment-3520074
We can keep working on this issue and bring it into Core ASAP. I do think this is a reasonable approach. I'm certain that we will get a number of accessibility reviews of Drupal 7 that will give us further room for improvement. We may not be able to get them all in D7 as there will no-doubt be some that affect the API or critical theme elements.
I do think that a number of us need to get better at writing & editing SimpleTest results to get a few more of these RTBC for D7 maintenance releases.
Comment #89
mgiffordtagging..
Comment #90
bowersox CreditAttribution: bowersox commentedDid some of these tests fail when these were individual patches rather than one mega-patch?
If so, looking at those shorter test results might help us identify which changes caused which failures.
Who is taking a stab at this?
Comment #91
mgiffordI wasn't in favour of this aggregation & have been pretty busy since it happened.
Way up in #56 @sun closed a bunch of other issues & created this massive one so that it would be easier for @dries & @webchick to review.
Sadly progress on this has really slowed down since that decision was made. I haven't had time to invest in debugging the aggregated patch (let alone verify that all of the issues addressed have been resolved in it).
I'd like to help, but don't know SimpleTest all that well & don't have a big block of time to devote to addressing a bigger issue just now.
Comment #92
Everett Zufelt CreditAttribution: Everett Zufelt commentedAgreed. I am not familiar enough with simpletest to try to whack this many failures. I was investigating some of the smaller issues prior to their closure.
A meta issue like this may be easier to review, but certainly is not easier to resolve, at least for me.
Comment #93
sunRe-rolled against HEAD.
Comment #94
sunI don't see why this shouldn't pass.
Comment #95
sunWe only want to do this patch once, so here comes the hard core check.
Comment #96
sunSorry, forgot some.
Comment #98
mgiffordThanks for rolling (and re-rolling) this master patch @sun. It applies nicely in my sandbox, but I get this error:
On the home page after clearing my cache. I refreshed the code base & was able to replicate it with fresh code (no other patches applied).
Comment #99
sunYes, that is in purpose. I've temporarily added an explicit PHP user warning to form_builder() whenever it encounters a form element that does not have a #title. We only want to do this patch once for D7. Of course, we'll remove that PHP user warning from this patch later on, but the goal is to make this patch pass - with the code that triggers explicit warnings.
Comment #101
sunComment #103
mgiffordI do wonder if it would make sense to split this into 3 separate issues rather than just one.
1) Some of the patches that were consolidated here are totally trivial. If there was a Quick fix tag at the time they'd probably already be in core.
2) Some of the issues trip up a hell of a lot of simpletests. Because of the size/complexity of this patch (well, probably more the simpletest fixes) it's proving difficult to nail down. However, it would be nice for someone to just look at the simpletest errors & be given some guidelines on how to do this. I suspect that much of it is pretty repeatable (this is the problem, here's how to address it). It just needs to be done 50 or so times to get fixed.
3) Finally there are still more complex missing form element titles that need to be added, especially for things like uploading attachments. I think those should stand alone as I don't know how close we are to fixing those.
Three different types of problems (easy, medium & hard) which I think should have been dealt with in 3 different issues (if not more).
I know this makes it a bit harder for @webchick & @dries, but I'd really like to see some more movement on this issue.
@sun's been doing some good work on trying to re-roll this. I'm also having computer grief at the moment, so am not going to be able to contribute as much till I sort things out again.
Comment #104
sun@mgifford: Please note that it also makes patch reviews harder for people who have to review and sign off a patch -- which has to happen before Dries or webchick will even notice. By splitting issues, every patch reviewer would have to familiarize with each individual issue at hand, and double-check that the proposed changes are actually in line with what we want to do. Therefore, it only makes sense to merge these changes into a single patch, and get that one done right. Fixing those remaining failures should be doable within no time.
Comment #105
mgifford@sun - It's not in my skill-set at this time to fix up up the remaining issues. If it was then I might share your perspective.
I want to see the many label issues that have been identified fixed. It also needs to be clear that this isn't going to fix all of the issues with missing labels.
I can review the patch when it is written, but I can't write this one.
Comment #106
ksenzeeLet me take another crack at it.
Comment #107
ksenzeeThis should get rid of a lot of the test failures. Some of them are spurious - the check in #99 catches all missing labels, even in places where we don't want them (such as the column of checkboxes on the permissions page, which is already labeled correctly and doesn't need another overall label for the group). But there are probably some real ones left.
Comment #109
Everett Zufelt CreditAttribution: Everett Zufelt commentedWow, this appears to be getting very close.
Can someone please give me a brief explanation of the difference between a test failing and there being an exception?
Comment #110
mgiffordGreat job @ksenzee not sure about the 202 exceptions, but a big improvement for sure. It's down from over 1000 exceptions in the last patch.
Comment #111
sunThis means that @ksenzee fixed all previously existing test failures. All remaining exceptions are caused by form elements that do not define a #title.
Note that you can skip the exceptions for #type 'machine_name'. Form elements of this #type automatically get a default #title set, if no custom #title was specified.
The exception message was crafted in a way that it exposes the originating form_id + the element #type, so by looking at the test results, you should be able to identify the forms and form elements that still need to be fixed.
(To hide #type 'machine_name' from the exceptions, the corresponding condition in form.inc [in this patch] would need a quick fix.)
Comment #112
ksenzeeYep, what @sun said. I'm fixing the remaining exceptions now, and I'll tweak the form.inc error condition to exclude some of the stuff we know is okay.
Comment #113
ksenzeeAnother round of fixes.
Comment #115
ksenzeeI've run out of time for the evening, so I'll unassign myself in case anyone else has time to finish up. The remaining exceptions are for form elements without titles in field_ui_field_edit_form and user_profile_form, plus a couple of test-only forms that don't matter.
Comment #116
yched CreditAttribution: yched commented"elements without titles in field_ui_field_edit_form"
They are declared in image_field_instance_settings_form() - instance settings for image fields.
Comment #117
mgifford@yched can you amend the patch and see if we can resolve this mega patch with all of the enhancements?
if not
@ksenzee is it worth pulling out the added label which is throwing the error and seeing if we can get most of the label issues fixed here now?
It's obviously my preference to get this all into core when it is released.
However, given the need for string translation some of the remaining label issues may be able to be addressed in point releases:
http://groups.drupal.org/node/99219
If we can work something out with the i18n folks that is.
Comment #118
mgiffordNote this related issue is missing:
#885616: Labels missing from a number of locale admin forms
And don't think it should be merged in here. I just wanted to point it out so it isn't forgotten.
Comment #119
yched CreditAttribution: yched commentedOK, fixed the missing elements pointed by the test exceptions
- a couple elements in image_field_instance_settings_form() - some others in there were properly handled already.
- a couple test forms
- expanded #type = 'date' FAPI elements - form_process_date()
Comment #120
mgiffordLooks great.
I applied this to my sandbox http://drupal7.dev.openconcept.ca
I passes the bot!
Navigated around a bunch it all seems to be working fine.
Looking forward to having this in core.
Comment #121
sunOf course, this has to be removed now.
This label sounds a bit odd. It's for a checkbox in a table, allowing to toggle whether something should be done with an item. Shortened that into "Update @title"
Same here, changed into "Operation".
Removed stale comment.
Missing t() and odd label. Changed into "Enabled languages".
Same here. Changed into "Default language".
Removed the "Enable" prefix.
Don't think that the internal choice ID should appear anywhere in the UI. Changed all of those.
Shortened to "Name". We don't use such lengthy labels anywhere else.
Removed all testing module changes.
Shortened to "Action".
Reverted this and fixed it properly: should be #type 'value', which is already used elsewhere for the same field in taxonomy.admin.inc.
Powered by Dreditor.
Comment #122
mgiffordMuch better. Thanks everyone! I walked through some of the main pain points for missing fields with http://wave.webaim.org/toolbar
Oh ya, I applied this in my D7 sandbox if folks want to check it out, let me know http://drupal7.dev.openconcept.ca
@sun - I do think you've also made improvements in the text. Thanks again for the detailed review!
Comment #123
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!