Last Comment Bug 389230 - Support datatype object attribute for <xul:textbox type="number">
: Support datatype object attribute for <xul:textbox type="number">
Status: RESOLVED WONTFIX
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: All All
: -- minor (vote)
: ---
Assigned To: alexander :surkov
:
Mentors:
Depends on:
Blocks: xula11y
  Show dependency treegraph
 
Reported: 2007-07-23 02:14 PDT by Aaron Leventhal
Modified: 2012-12-30 13:40 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.89 KB, patch)
2007-07-24 00:24 PDT, alexander :surkov
aaronlev: review+
Details | Diff | Splinter Review
patc2 (31.85 KB, patch)
2007-08-06 10:57 PDT, alexander :surkov
aaronlev: review-
Details | Diff | Splinter Review

Description Aaron Leventhal 2007-07-23 02:14:44 PDT
Any time we know something about the datatype of a form control we should expose that information.

See http://wiki.mozilla.org/Accessibility/Datatypes

For <xul:textbox type="number"> we should expose the datatype object attribute.

In the future this will help people with physical disabilities that use alternative input tools. It allows onscreen keyboards to simplify access for the field, and allows voice input software to limit the current possibilities, which increases accuracy.
Comment 1 alexander :surkov 2007-07-24 00:24:48 PDT
Created attachment 273548 [details] [diff] [review]
patch
Comment 2 alexander :surkov 2007-07-24 06:23:25 PDT
(In reply to comment #0)

> See http://wiki.mozilla.org/Accessibility/Datatypes

Is the page is up to date? I mean for xforms we expose 'datatype' area attribute, the page suggests to expose 'xs-type'.

Also, Aaron, do you want to expose the following attributes too for numberbox:

xs-totaldigits
xs-fractiondigits
xs-valuemin
xs-valuemax

Right? Do we need to use 'xs-' prefix?
Comment 3 Aaron Leventhal 2007-07-24 15:34:37 PDT
I don't know. Yes, I was thinking it was a good idea to put those in because it's easier to see all of the datatype-related object attributes. Otherwise, it might be hard for developers to understand that all of these object attributes belong together? What do you think?

Do we know any of the answers to xs-totaldigits, xs-fractiondigits, xs-valuemin or 
xs-valuemax?
Comment 4 alexander :surkov 2007-07-24 22:19:17 PDT
(In reply to comment #3)
> I don't know. Yes, I was thinking it was a good idea to put those in because
> it's easier to see all of the datatype-related object attributes. Otherwise, it
> might be hard for developers to understand that all of these object attributes
> belong together? What do you think?

I have the questions only. Who wants to use these attributes? Who will provide these attributes excepting us?

I'm not sure we should expose xs-type/xs-valuemin/xs-valuemax because there are similar ARIA properties.

> Do we know any of the answers to xs-totaldigits, xs-fractiondigits, xs-valuemin
> or 
> xs-valuemax?
> 

I think we can set these attributes based on info provided by numberbox.
Comment 5 alexander :surkov 2007-07-24 22:23:27 PDT
If we want to expose datatype/valuenow/valuemin/valuemax for numberbox then we should have an accessible for numberbox that implements nsIAccessibleValue. Right?
Comment 6 Aaron Leventhal 2007-07-25 07:55:18 PDT
> Who wants to use these attributes? 
Any alternative input system -- voice input, on screen keyboards, cell phones, etc.

> Who will provide these attributes excepting us?
Most likely other browsers

> I'm not sure we should expose xs-type/xs-valuemin/xs-valuemax because 
> there are similar ARIA properties.
Actually, we do. We want to map these properties the same way to object attributes whether they come via ARIA, XUL, XForms or HTML 5. Unless there's some problem you know of?

Using niIAccessibleValue for the numberbox as a good idea. Good point.
Comment 7 alexander :surkov 2007-07-25 10:43:24 PDT
(In reply to comment #6)

> > I'm not sure we should expose xs-type/xs-valuemin/xs-valuemax because 
> > there are similar ARIA properties.
> Actually, we do. We want to map these properties the same way to object
> attributes whether they come via ARIA, XUL, XForms or HTML 5. Unless there's
> some problem you know of?

I have a problem with terms. What is difference between properties and object attributes?
Comment 8 alexander :surkov 2007-07-25 10:48:40 PDT
(In reply to comment #7)
> (In reply to comment #6)
> 
> > > I'm not sure we should expose xs-type/xs-valuemin/xs-valuemax because 
> > > there are similar ARIA properties.
> > Actually, we do. We want to map these properties the same way to object
> > attributes whether they come via ARIA, XUL, XForms or HTML 5. Unless there's
> > some problem you know of?
> 
> I have a problem with terms. What is difference between properties and object
> attributes?
> 

Ah, do you mean if ARIA property is 'valuemin' then we should not expose 'valuemin' object attribute but we should expose 'xs-valuemin'? I just started to think object attributes is upperset of ARIA properties and there where they are coincide each other then they have the same names. It was wrong point I guess. Is there any documentation which attributes we should expose? And what we should do with 'datatype' attribute we expose now, should we rename it as 'xs-type'?
Comment 9 Aaron Leventhal 2007-07-27 03:46:07 PDT
> Ah, do you mean if ARIA property is 'valuemin' then we should not expose
> 'valuemin' object attribute but we should expose 'xs-valuemin'? 
Right, it's an idea.

We should only change the name of a DOM attribute if we expose it as accessible object property if there is a good reason. In this case, my reasoning is that if all the data constraint attributes start with "xs-" or some prefix, it will be easier for AT developers to know which ones they are.

Object attributes are purposely not specified anywhere. They're "loosely specified" so that application developers have the flexibility to expose new things. But, as we implement them we should document what we implement. Other vendors will likely follow our lead.
Comment 10 Aaron Leventhal 2007-07-27 03:46:57 PDT
Surkov, do you think we should use a prefix like "xs-" for all the datatype-related object attributes?

xs-type, xs-valuemin, etc.?
Comment 11 alexander :surkov 2007-07-27 04:37:01 PDT
(In reply to comment #10)
> Surkov, do you think we should use a prefix like "xs-" for all the
> datatype-related object attributes?
> 
> xs-type, xs-valuemin, etc.?
> 

I don't mind really. It doesn't make easier to find them because they should know what exactly they search. But however it may prevent to use one and the same name for different attribute by mistake. xs means XML Schema?
Comment 12 Aaron Leventhal 2007-07-27 05:49:04 PDT
Right it stands for XML-schema, which is a bad dependency for the name, since the info can come from something else.

So maybe:

value-min, value-type, value-pattern, etc. would be good.

I think it makes it easier for developers to understand, especially once we get a lot of different object attributes.

Comment 13 Aaron Leventhal 2007-07-27 05:49:50 PDT
Or even remove the hyphen, which means valuemin and valuemax would still be the same.

So then you'd also have valuepattern, valuetype etc.
Comment 14 alexander :surkov 2007-07-27 06:53:33 PDT
(In reply to comment #13)
> Or even remove the hyphen, which means valuemin and valuemax would still be the
> same.
> 
> So then you'd also have valuepattern, valuetype etc.
> 

So why do not follow ARIA names? It's lesser things to remember. Btw, what is a value pattern?
Comment 15 Aaron Leventhal 2007-07-27 08:19:44 PDT
There aren't ARIA names for everything that we have an object attribute.

For example, you can use aaa:datatype to point to an schema definition, which defines the pattern of A data string. The pattern is a regular expression.
Comment 16 alexander :surkov 2007-07-27 09:34:26 PDT
(In reply to comment #15)
> There aren't ARIA names for everything that we have an object attribute.

But for those that are defined in ARIA why to use something else?
Comment 17 Aaron Leventhal 2007-07-27 10:03:29 PDT
Okay. Most of them don't actually have ARIA equivalents, but are defined via schema definition.

I've updated this doc -- how is that?
http://wiki.mozilla.org/Accessibility/Datatypes

If you'd like something different go ahead and change it and I'll view the diff.
Comment 18 alexander :surkov 2007-08-06 10:57:12 PDT
Created attachment 275452 [details] [diff] [review]
patc2

1) expose 'valuemin', 'valuemax', 'valuenow' attributes
2) add support for textbox@type="number"
Comment 19 Aaron Leventhal 2007-08-08 10:49:21 PDT
Surkov, I hope youy don't get too annoyed, but I believe I made a mistake :/ There's no reason to have valuenow, valuemin or valuemax as object attributes when there's already nsIAccessibleValue/IAccessibleValue/AtkValue interfaces to get that information.

The other object attributes on that wiki page should still be important -- there's no other way to expose those.

I don't know why I just realized this now. Sorry for any extra work this causes.
Comment 20 alexander :surkov 2007-08-08 17:37:45 PDT
Ok. We expose 'posinset' e.t.c attributes because there is no groupPosition() in ATK. We don't want to expose 'valuenow' and e.t.c when nsIAccessibleValue is implemented because there are neither IValue interface nor getAttrbiutes() method for mac and os/2. Correct?
Comment 21 Aaron Leventhal 2007-08-08 19:33:16 PDT
I'm not worried about Mac right now. When we do I expect that Mac has some kind of known attribute for value, and we'll need to look at it then.

OS/2 has no special a11y API and we'll never be worried about that anyway.
Comment 22 Aaron Leventhal 2007-08-10 09:05:28 PDT
Comment on attachment 275452 [details] [diff] [review]
patc2

We don't need to expose valuenow/valuemin/valuemax as object attibutes because IA2/ATK do it.
Comment 23 Marco Zehe (:MarcoZ) on PTO until August 15 2011-11-01 08:05:56 PDT
Alex, do we still want this?
Comment 24 alexander :surkov 2011-11-01 14:47:35 PDT
(In reply to Marco Zehe (:MarcoZ) from comment #23)
> Alex, do we still want this?

it appears datatype object attribute wasn't picked up by parties (AT or IA2). So I don't think we should anything do here.

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