Last Comment Bug 445510 - Support ARIA-based text attributes
: Support ARIA-based text attributes
Status: RESOLVED FIXED
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal with 1 vote (vote)
: mozilla21
Assigned To: alexander :surkov
:
Mentors:
http://www.w3.org/WAI/PF/aria-impleme...
Depends on: 746484
Blocks: textattra11y aria
  Show dependency treegraph
 
Reported: 2008-07-16 07:43 PDT by Aaron Leventhal
Modified: 2013-02-09 07:47 PST (History)
5 users (show)
surkov.alexander: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (11.50 KB, patch)
2013-02-07 23:00 PST, alexander :surkov
tbsaunde+mozbugs: review+
Details | Diff | Splinter Review

Description Aaron Leventhal 2008-07-16 07:43:23 PDT
Currently we only have aria-invalid. If it's present, not-empty and not "false" then we should expose it as the "invalid" text attribute for the range it's on.

In the future (perhaps for ARIA 2), there will likely be more, in order to support ARIA-based word processors.
Comment 1 alexander :surkov 2008-07-22 06:59:00 PDT
(In reply to comment #0)
> Currently we only have aria-invalid. If it's present, not-empty and not "false"
> then we should expose it as the "invalid" text attribute for the range it's on.
> 
> In the future (perhaps for ARIA 2), there will likely be more, in order to
> support ARIA-based word processors.
> 

for the aria-invalid="value" we should expose text attribute "invalid: value", right?
Comment 2 Marco Zehe (:MarcoZ) on PTO until August 15 2008-07-22 07:39:27 PDT
(In reply to comment #1)
> for the aria-invalid="value" we should expose text attribute "invalid: value",
> right?

Correct!
Comment 3 David Bolter [:davidb] 2009-01-13 11:01:05 PST
Is this bug up to date? From a quick skim it looks like test_textattrs.html includes a text attribute test for invalid: spelling.
Comment 4 alexander :surkov 2009-01-13 22:54:49 PST
(In reply to comment #3)
> Is this bug up to date? From a quick skim it looks like test_textattrs.html
> includes a text attribute test for invalid: spelling.

David, but iirc we don't expose aria-invalid to text attributes. Probably we should change bug summary to reflect this.
Comment 5 David Bolter [:davidb] 2009-01-14 06:01:30 PST
OK. I'm thinking it is not ideal that we would expose both invalid:spelling as well as aria-invalid:spelling, but perhaps that is most robust.
Comment 6 Aaron Leventhal 2009-01-14 07:08:44 PST
Strip off aria- when turning it into a text attribute.

So you are just exposing invalid: spelling. Or am I misunderstanding the concern?
Comment 7 David Bolter [:davidb] 2009-08-26 16:05:28 PDT
Right, okay, so we can arrive at invalid: spelling through aria or through gecko's inline spell checker.

I'm trying to figure out the priority of this bug; any evidence of usage in the wild?
Comment 8 David Bolter [:davidb] 2009-08-27 12:55:55 PDT
OK Marco tweeted there is usage.
Comment 9 David Bolter [:davidb] 2009-08-27 16:31:22 PDT
Values of aria-invalid are:

grammar:  A grammatical error was detected.
false:    There are no detected errors in the value.
spelling: A spelling error was detected.
true:     The value entered by the user has failed validation.

Our current non-aria implementation nsHyperTextAccessible::GetTextAttributes, checks:

spelling
language
CSS-based attributes

I'm wondering how we want to combine/reconcile these. Do we want to completely bail on our existing implementation if aria-invalid is present?
Comment 10 alexander :surkov 2009-08-27 22:12:41 PDT
(In reply to comment #9)

> I'm wondering how we want to combine/reconcile these. Do we want to completely
> bail on our existing implementation if aria-invalid is present?

ARIA always wins - that's paradigm iirc.
Comment 11 David Bolter [:davidb] 2009-09-02 09:14:11 PDT
(In reply to comment #10)
> (In reply to comment #9)
> 
> > I'm wondering how we want to combine/reconcile these. Do we want to completely
> > bail on our existing implementation if aria-invalid is present?
> 
> ARIA always wins - that's paradigm iirc.

Yes I agree. I wonder though, if there is an aria-invalid="true" which means value failed validation, and our spell check finds a spelling error, it might be nice to expose both (aria-invalid via obj attr) and (spelling invalid via text attr). Maybe that's just silly.
Comment 12 alexander :surkov 2012-04-17 23:12:14 PDT
we need to fix bug 746484 because we can't implement the bug until we have proper mechanism to work with multivalue text attributes.

consider:
<input aria-invalid="grammar" value="smoe misspeled ttext>
at 0 offset we should expose "invalid:grammar,spelling".
Comment 13 alexander :surkov 2012-04-17 23:14:06 PDT
David, you keep bug assigned. Is still valid?
Comment 14 David Bolter [:davidb] 2012-04-18 12:34:24 PDT
Closing invalid for now.
Comment 15 alexander :surkov 2012-04-22 21:54:03 PDT
(In reply to David Bolter [:davidb] from comment #14)
> Closing invalid for now.

huh, I meant validness of bug assignee status, not the bug status. The bug itself is valid, at least ARIA spec requires us to do that.
Comment 16 David Bolter [:davidb] 2012-04-23 08:10:29 PDT
OK I couldn't find specifics for this bug in the spec.
Comment 17 alexander :surkov 2012-04-24 00:37:45 PDT
(In reply to David Bolter [:davidb] from comment #16)
> OK I couldn't find specifics for this bug in the spec.

see aria-invalid at http://www.w3.org/WAI/PF/aria-implementation/#mapping_state-property_table:

aria-invalid="true", "spelling", or "grammar" (state)	Set IA2_STATE_INVALID_ENTRY.
Expose the value as a text attribute (not object attribute).
Comment 18 David Bolter [:davidb] 2012-04-24 07:15:00 PDT
Thanks. I don't think I can read the spec usefully anymore. There must be a finite number of times one can read it.
Comment 19 alexander :surkov 2013-02-07 23:00:00 PST
Created attachment 711707 [details] [diff] [review]
patch

basic implementation of aria-invalid mapped to invalid text attribute.

1) we don't support aria-invalid inheritance and token list for aria-invalid until the ARIA spec clearly address that
2) invalid:spelling text attribute coming from builtin spellchecker overrides aria-invalid values, again until the spec says something about values conflict resolving
Comment 20 Trevor Saunders (:tbsaunde) 2013-02-08 01:51:18 PST
Comment on attachment 711707 [details] [diff] [review]
patch

the true and false values are weird and I'm not sure what they're supposed to mean, but whatever they mean I guess just reflecting them is fine.

>+TextAttrsMgr::InvalidTextAttr::
>+  GetValueFor(Accessible* aAccessible, uint32_t* aValue)
>+{
>+  nsIContent* elm = nsCoreUtils::GetDOMElementFor(aAccessible->GetContent());

it seems like it would be good to add accessible->Element() for this sort of thing.
Comment 21 alexander :surkov 2013-02-08 17:40:04 PST
(In reply to Trevor Saunders (:tbsaunde) from comment #20)
> Comment on attachment 711707 [details] [diff] [review]
> patch
> 
> the true and false values are weird and I'm not sure what they're supposed
> to mean, but whatever they mean I guess just reflecting them is fine.

I agree they seems useless, also any unknown value mapping to 'true' is weird as well, I would just expose that value AT to let them decide.

> >+TextAttrsMgr::InvalidTextAttr::
> >+  GetValueFor(Accessible* aAccessible, uint32_t* aValue)
> >+{
> >+  nsIContent* elm = nsCoreUtils::GetDOMElementFor(aAccessible->GetContent());
> 
> it seems like it would be good to add accessible->Element() for this sort of
> thing.

it can be confusing, AssociatedElement() perhaps. It can be gfb.
Comment 23 Ryan VanderMeulen [:RyanVM] 2013-02-09 07:47:46 PST
https://hg.mozilla.org/mozilla-central/rev/b27ce5760063

Note You need to log in before you can comment on or make changes to this bug.