Closed
Bug 477876
Opened 15 years ago
Closed 15 years ago
expose checkable="true" object attribute
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b4
People
(Reporter: davidb, Assigned: davidb)
References
(Blocks 1 open bug)
Details
(Keywords: access, verified1.9.1)
Attachments
(1 file, 4 obsolete files)
9.35 KB,
patch
|
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
Whenever we have a defined value for aria-checked it is recommended we expose checkable="true" as an object attribute.
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → david.bolter
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•15 years ago
|
||
This is probably the cleanest fix. Thoughts?
Attachment #362750 -
Flags: review?(marco.zehe)
Updated•15 years ago
|
Attachment #362750 -
Flags: review?(marco.zehe) → review+
Comment 2•15 years ago
|
||
Comment on attachment 362750 [details] [diff] [review] patch1 r=me. Thanks!
Assignee | ||
Updated•15 years ago
|
Attachment #362750 -
Flags: review?(surkov.alexander)
Comment 3•15 years ago
|
||
Comment on attachment 362750 [details] [diff] [review] patch1 >+ // Expose checkable object attribute for checkable roles, and aria-checked >+ PRUint32 state = 0; >+ GetState(&state, nsnull); >+ if ((state & nsIAccessibleStates::STATE_CHECKABLE) || >+ nsAccUtils::HasDefinedARIAToken(content, nsAccessibilityAtoms::aria_checked)) It sounds it is excess check, (state & nsIAccessibleStates::STATE_CHECKABLE) should be enough, it it's not then I guess it's a bug. >+ attributes->SetStringProperty(NS_LITERAL_CSTRING("checkable"), NS_LITERAL_STRING("true"), >+ oldValueUnused); while you are here I would prefer to have checkeable atom and use nsAccUtils::SetAccAttr() method. >+ testAttrs("checked", {"checkable" : "true"}, true); regarding tests I would like to have tests for checkable roles from HTML and ARIA markup.
Attachment #362750 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 4•15 years ago
|
||
Thanks Surkov. How's this one?
Attachment #362750 -
Attachment is obsolete: true
Attachment #362901 -
Flags: review?(surkov.alexander)
Comment 5•15 years ago
|
||
Comment on attachment 362901 [details] [diff] [review] patch2 > "radio", > nsIAccessibleRole::ROLE_RADIOBUTTON, > eNoValue, > eSelectAction, >- kNoReqStates, >+ nsIAccessibleStates::STATE_CHECKABLE, >+ if ((state & nsIAccessibleStates::STATE_CHECKABLE) || >+ nsAccUtils::HasDefinedARIAToken(content, nsAccessibilityAtoms::aria_pressed)) Will we expose STATE_CHECKABLE for checked="undefined". I guess we will. Why don't we expose STATE_CHECKABLE for defined aria_pressed but we want to expose "checkabe" object attribute?
Assignee | ||
Comment 6•15 years ago
|
||
(In reply to comment #5) > (From update of attachment 362901 [details] [diff] [review]) > > > "radio", > > nsIAccessibleRole::ROLE_RADIOBUTTON, > > eNoValue, > > eSelectAction, > >- kNoReqStates, > >+ nsIAccessibleStates::STATE_CHECKABLE, > > >+ if ((state & nsIAccessibleStates::STATE_CHECKABLE) || > >+ nsAccUtils::HasDefinedARIAToken(content, nsAccessibilityAtoms::aria_pressed)) > > Will we expose STATE_CHECKABLE for checked="undefined". I guess we will. Right. > > Why don't we expose STATE_CHECKABLE for defined aria_pressed but we want to > expose "checkabe" object attribute? Hmmm yeah we should probably do that. Also, I wonder if we should fire a state change event in nsDocAccessible::ARIAAttributeChanged for CHECKABLE where applicable? Overkill?
Assignee | ||
Comment 7•15 years ago
|
||
Attachment #362901 -
Attachment is obsolete: true
Attachment #362928 -
Flags: review?(surkov.alexander)
Attachment #362901 -
Flags: review?(surkov.alexander)
Comment 8•15 years ago
|
||
Comment on attachment 362928 [details] [diff] [review] patch3 >+ {&nsAccessibilityAtoms::aria_pressed, kBoolState, nsIAccessibleStates::STATE_PRESSED | nsIAccessibleStates::STATE_CHECKABLE}, why pressed button should be checkable? >+ // Expose checkable object attribute for checkable roles, aria-checked, aria-pressed nit: expose checkable object attribute if the accessible has checkable state? >+ PRUint32 state = 0; >+ GetState(&state, nsnull); >+ if ((state & nsIAccessibleStates::STATE_CHECKABLE) || >+ nsAccUtils::HasDefinedARIAToken(content, nsAccessibilityAtoms::aria_pressed)) I would vote to not expose checkable state for undefined aria_pressed. It's better to fix GetState method.
Comment 9•15 years ago
|
||
(In reply to comment #6) > > Also, I wonder if we should fire a state change event in > nsDocAccessible::ARIAAttributeChanged for CHECKABLE where applicable? Overkill? I guess so because STATE_CHECKABLE is mapped to STATE_MARQUEED for MSAA only, neither ATK or IA2 don't have this state and we don't fire state change event for checkable state at all in the meantime.
Assignee | ||
Comment 10•15 years ago
|
||
(In reply to comment #8) > (From update of attachment 362928 [details] [diff] [review]) > > >+ {&nsAccessibilityAtoms::aria_pressed, kBoolState, nsIAccessibleStates::STATE_PRESSED | nsIAccessibleStates::STATE_CHECKABLE}, > > why pressed button should be checkable? It is as specified in the aria impl BPG. The these buttons have two states, pressed, and unpressed. Essentially they are toggles (like checkbox). > > >+ // Expose checkable object attribute for checkable roles, aria-checked, aria-pressed > > nit: expose checkable object attribute if the accessible has checkable state? Not sure. I'll try to think of something. > > >+ PRUint32 state = 0; > >+ GetState(&state, nsnull); > >+ if ((state & nsIAccessibleStates::STATE_CHECKABLE) || > >+ nsAccUtils::HasDefinedARIAToken(content, nsAccessibilityAtoms::aria_pressed)) > > I would vote to not expose checkable state for undefined aria_pressed. It's > better to fix GetState method. Unfortunately the BPG states explicitly: if aria-pressed is not undefined expose object attribute checkable="true"
Assignee | ||
Comment 11•15 years ago
|
||
(In reply to comment #9) > (In reply to comment #6) > > > > > Also, I wonder if we should fire a state change event in > > nsDocAccessible::ARIAAttributeChanged for CHECKABLE where applicable? Overkill? > > I guess so because STATE_CHECKABLE is mapped to STATE_MARQUEED for MSAA only, > neither ATK or IA2 don't have this state and we don't fire state change event > for checkable state at all in the meantime. Okay let's worry about that when it is impactful.
Assignee | ||
Comment 12•15 years ago
|
||
Surkov, I liked your suggestions. Let me know what you think of this one.
Attachment #362928 -
Attachment is obsolete: true
Attachment #363110 -
Flags: review?(surkov.alexander)
Attachment #362928 -
Flags: review?(surkov.alexander)
Updated•15 years ago
|
Attachment #363110 -
Flags: review?(surkov.alexander) → review+
Comment 13•15 years ago
|
||
Comment on attachment 363110 [details] [diff] [review] patch4 looks ok, though I liked your test // bug 477876 testAttrs("checked", {"checkable" : "true"}, true); because it tested the case when there is no checkable role r=me
Comment 14•15 years ago
|
||
Comment on attachment 363110 [details] [diff] [review] patch4 >+ // Expose checkable object attribute if the accessible has checkable state >+ PRUint32 state = 0; >+ GetState(&state, nsnull); nit: you could use nsAccUtils::State(this) - it would be later more easy to deny nsnull as second argument.
Assignee | ||
Comment 15•15 years ago
|
||
Please push this one.
Attachment #363110 -
Attachment is obsolete: true
Comment 16•15 years ago
|
||
Pushed on David's behalf in changeset: http://hg.mozilla.org/mozilla-central/rev/e35c958e35e7
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #363117 -
Flags: approval1.9.1?
Updated•15 years ago
|
Flags: in-testsuite+
Comment 17•15 years ago
|
||
Comment on attachment 363117 [details] [diff] [review] Patch to push a191=beltzner
Attachment #363117 -
Flags: approval1.9.1? → approval1.9.1+
Comment 18•15 years ago
|
||
Pushed to mozilla-1.9.1 on David's behalf in changeset: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/5a57b1f11482
Keywords: fixed1.9.1
Target Milestone: --- → mozilla1.9.1b4
Comment 19•15 years ago
|
||
Verified fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090422 Shiretoko/3.5b4pre (.NET CLR 3.5.30729)
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•