After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 509809 - We should try to do a better job of guessing labels in poorly-coded forms
We should try to do a better job of guessing labels in poorly-coded forms
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.21.x
Other All
: Normal normal
: 2.22.0
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks: 404403
 
 
Reported: 2008-01-16 02:34 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2008-07-22 19:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
revision 1 (575 bytes, patch)
2008-01-16 02:51 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
also guess radio buttons correctly (1.81 KB, patch)
2008-01-16 03:26 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2008-01-16 02:34:24 UTC
From Mike via email:

------------------------------------------------
Hey Joanie, did you get this message from Aaron?  Notice how poorly we 
do with this form.
Mike

-------- Original Message --------
Subject:        Seeking feedback on per-URL screen reader scripts thread
Date:   Tue, 15 Jan 2008 14:22:13 -0500
From:   Aaron M Leventhal <aleventh@us.ibm.com>
To:     Aaron M Leventhal <aleventh@us.ibm.com>



Please see the mozilla.dev.accessibility newsgroup or the mailing list
equivalent (its the same discussion list).
Here is the mailing list signup page:
https://lists.mozilla.org/listinfo/dev-accessibility

- Aaron
------------------------------------------------

Observations and a patch to follow.
Comment 1 Joanmarie Diggs (IRC: joanie) 2008-01-16 02:42:17 UTC
Happily we read that form correct by line and the braille seems to be correct.  What we are not doing a spectacular job with is trying to guess the label.  That's the trouble with guessing.  If we're too liberal with our guessing, we'll speak all sorts of irrelevant stuff.  If we're too strict, we don't guess the label.

This is failing the guessing label from line test because that checks to see if the object is contained in a form.  There's a form tag in there alright and it precedes the other elements in the form.  But that form tag is not in the ancestry of the items we're looking at.  Therefore, we suspect our candidate label is outside of the form and as a result likely not a label.

Guess label from table is failing because we've apparently got a paragraph in our ancestry.  This too was designed to minimize erroneous guesses, but I *suspect* (guess even) that it's safe to set our stop ancestor to the table rather than the document frame. That seems to solve the problem.
Comment 2 Joanmarie Diggs (IRC: joanie) 2008-01-16 02:51:06 UTC
Created attachment 102959 [details] [review]
revision 1

This causes the non-labeled entries to have the correct text guessed for them.  I'll look at radio buttons next.

BTW, pylinted; not regression tested.  I need to update existing tests and write more tests -- including some for label guess.
Comment 3 Joanmarie Diggs (IRC: joanie) 2008-01-16 03:26:28 UTC
Created attachment 102963 [details] [review]
also guess radio buttons correctly

Once again, our radio buttons don't technically live inside the form.  <sigh>

The only solution I see is to give radio buttons a free pass.  We currently have a 50 pixel maximum distance requirement for guessing text that's on the right so we shouldn't guess too much junk.
Comment 4 Mike Pedersen 2008-01-16 05:43:08 UTC
Ahhhh much better.  thanks much 
Comment 5 Joanmarie Diggs (IRC: joanie) 2008-01-16 05:55:01 UTC
You bet!

As I observed in comment #2, I really need to focus on regression tests over the next couple of days and will be a lot happier if I do that before committing this patch (and a couple of others).  Therefore, I'm going to put this in the status of [testing required] for now. 
Comment 6 Joanmarie Diggs (IRC: joanie) 2008-01-20 21:54:29 UTC
I wrote some additional regression tests.  This patch does introduce any regressions (at least based upon our tests), pylints to 10.0, and should be pretty safe given the nature of the change.  Therefore, I've committed this patch and am moving this bug to pending.
Comment 7 Mike Pedersen 2008-01-24 20:34:19 UTC
This one fixes a variety of sites.  thanks much 
Comment 8 Joanmarie Diggs (IRC: joanie) 2008-01-24 20:40:56 UTC
Thanks Mike.  Closing as FIXED.