Closed Bug 823927 Opened 12 years ago Closed 12 years ago

text is jammed with control's text in name computation

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

examples: https://dvcs.w3.org/hg/pfwg/raw-file/tip/ARIA/1.0/tests/test-files/name-computation-input/617.html https://dvcs.w3.org/hg/pfwg/raw-file/tip/ARIA/1.0/tests/test-files/name-computation-input/660.html tracking url: https://wiki.mozilla.org/Accessibility/ARIA1.0TestSuiteFailures#617 code snippet: <label for="test">foo<input type="text" value="bar">baz</label></body> Firefox gives "foo barbaz". Rich expects: "foo bar baz". However I don't see where ARIA spec requires that (refer to http://www.w3.org/TR/wai-aria/roles#namecalculation). Also extra spaces aren't covered by our documented algorithm (current version - http://asurkov.blogspot.ru/2012/11/accessilbe-firefox-text-equivalent.html) but our implementation gives the first space (after "foo"). Also we have a comment in code "Insert spaces to insure that words from controls aren't jammed together" what makes me think that requested spaces should be presented. So we have a bug. Thoughts?
Trev, do you have opinion?
> code snippet: > <label for="test">foo<input type="text" value="bar">baz</label></body> > > Firefox gives "foo barbaz". Rich expects: "foo bar baz". However I don't see I'd say before / after should be consistant. So I'd be fine with either "foo bar baz" or "foobarbaz". what does it look like on screen? I'd sort of think we shouldn't add any spaces and author can do it themselves if spaces are what they want. On the other maybe author always wants spaces / visually there are spaces so author adding space would be silly in which us adding spaces might make more sense. > where ARIA spec requires that (refer to > http://www.w3.org/TR/wai-aria/roles#namecalculation). sounds like they have a bug then since tests don't align with spec.
visually they aren't jammed of course since the input control has border and margin but the author can use easily styling or ARIA widgets to make it not working. Probably he doesn't have a practical reason to do so. (In reply to Trevor Saunders (:tbsaunde) from comment #2) > > where ARIA spec requires that (refer to > > http://www.w3.org/TR/wai-aria/roles#namecalculation). > > sounds like they have a bug then since tests don't align with spec. yes, that won't be fixed until the next ARIA version though and in either case I'm not happy with current ARIA algorithm at all. Jamie, do you have opinion on this bug?
(In reply to alexander :surkov from comment #3) > Jamie, do you have opinion on this bug? From a usability perspective, I'd prefer to see spaces both before and after. However, looking only from a technical/principle perspective, I can understand why there would be no spaces at all. Ideally, whether there are spaces should be based on whether there is space visually (accounting for borders, etc.), but I imagine that's insanely difficult to calculate and imo it's not worth the effort.
(In reply to James Teh [:Jamie] from comment #4) > Ideally, whether there are > spaces should be based on whether there is space visually (accounting for > borders, etc.), but I imagine that's insanely difficult to calculate and imo > it's not worth the effort. I find this idea rightest among all we can do. Possible it's not so difficult to implement it.
(In reply to alexander :surkov from comment #5) > (In reply to James Teh [:Jamie] from comment #4) > > Ideally, whether there are > > spaces should be based on whether there is space visually (accounting for > > borders, etc.), but I imagine that's insanely difficult to calculate and imo > > it's not worth the effort. > > I find this idea rightest among all we can do. Possible it's not so > difficult to implement it. but it should work when we pick up a name from text content. It might be not very applicable when we deal with controls. Say, we have a progress control surrounded by text with no spaces like <label>text_from_left<span role="progress" aria-valuenow="5">text_from_right</label> In this case text equivalent is text_from_left + progress value + text_from_right. It doesn't seem that borders, margins etc are really suitable for space detection since progress control is just a rectangular thing with another rectangular thing inside. It should be ok if we just insert spaces around progress value.
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #712358 - Flags: review?(trev.saunders)
Comment on attachment 712358 [details] [diff] [review] patch >+ <!-- name from subtre, surround control by spaces to not jamm the text --> *tree
Attachment #712358 - Flags: review?(trev.saunders) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: