Closed Bug 1166321 Opened 6 years ago Closed 6 years ago

[AccessFu] Add support for role="switch" accessible elements.

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: yzen, Assigned: yzen)

References

Details

(Keywords: access)

Attachments

(1 file)

Right now role="switch" is not supported though it would be super useful for gaia-components and in Firefox OS in general.
Attached patch 1166321 patch v1Splinter Review
Attachment #8608727 - Flags: review?(eitan)
Blocks: 1167202
Comment on attachment 8608727 [details] [diff] [review]
1166321 patch v1

Review of attachment 8608727 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/jsat/OutputGenerator.jsm
@@ +812,4 @@
>        aBraille.push({
> +        string: aRoleStr === 'switch' ?
> +          this._getOutputName(checked ? 'stateOn' : 'stateOff') :
> +          this._getOutputName(checked ? 'stateChecked' : 'stateUnchecked')

The state displayed for both roles is identical. Do we really need this distinction?

::: dom/locales/en-US/chrome/accessibility/AccessFu.properties
@@ +127,5 @@
>  pressAction    =      pressed
>  checkAction    =      checked
>  uncheckAction  =      unchecked
> +onAction       =      on
> +offAction      =      off

Ideally, this would be a past tense verb like the rest of the actions. But that might be a bit too chatty: "turned on"

@@ +216,5 @@
>  outlineitemAbbr    =       outline item
>  pagetabAbbr        =       tab
>  propertypageAbbr   =       property page
>  graphicAbbr        =       graphic
> +switchAbbr         =       switch

You could maybe remove the vowel and just have swtch, but someone who uses a braille display would know better. Also, I don't think this is ever displayed anyway, because the state is used.
Attachment #8608727 - Flags: review?(eitan) → review+
https://hg.mozilla.org/mozilla-central/rev/7526d40755d0
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.