Ticket #5055 (closed defect: fixed)

Opened 13 months ago

Last modified 10 months ago

add apis for consistent handling of tabindex

Reported by: becky Owned by: simonjb
Priority: normal Milestone: 1.1
Component: Accessibility Version: 0.9
Severity: normal Keywords:
Cc: davidb, alex, sjmiles

Description

the tabindex attribute is treated differently by the browser and between HTML and XTML. We should add apis for getting and setting tabindex attribute to avoid bugs due to these differences.

Attachments

5055.diff (4.0 kB) - added by simonjb 11 months ago.

Change History

Changed 12 months ago by becky

See http://www.weba11y.com/blog/2007/11/29/fun-with-the-tabindex-attribute/ for details about tabindex

I think we should have the following apis:

setTabindex(element, value) {element.tabIndex = value;}

getTabindex(element) { element.getAttribute(tabindex); }

hasTabindex(element) { element.hasAttribute(tabindex); //needs work for IE }

We also need to be consistent in templates and always specify with lowercase letter i (eye) (although tabindex is generally not in the templates any longer)

Changed 12 months ago by becky

  • owner changed from becky to simonjb

Changed 12 months ago by simonjb

  • status changed from new to assigned

Changed 12 months ago by davidb

  • cc davidb added

Changed 11 months ago by simonjb

Changed 11 months ago by simonjb

  • status changed from assigned to closed
  • resolution set to fixed

(In [11891]) Added new API for getting and setting HTML attributes: dojo.hasAttr(), dojo.attr(), and dojo.removeAttr(). Fixes #5055. !strict (errors outside of my changes)

Changed 11 months ago by simonjb

(In [11892]) Minor doc fix. Refs #5055. !strict

Changed 11 months ago by peller

  • cc alex, sjmiles added
  • status changed from closed to reopened
  • resolution deleted

We need to confirm that this belongs in _base.

Changed 11 months ago by simonjb

(In [11895]) Fixed up the _base/html.html unit test file to pass on Opera 9. I disabled some tests that cannot pass (tabindex="-1"). Refs #5055.

Changed 11 months ago by simonjb

(In [11981]) Small code simplification for dojo.hasAttr(). Refs #5055. !strict

Changed 10 months ago by simonjb

In December I wrote up a post to the Dojo contributors mailing list examining the size impact of the API:

http://dojotoolkit.org/pipermail/dojo-contributors/2007-December/008530.html

I received only one response, which asked that the code be made smaller but stay in _base (http://dojotoolkit.org/pipermail/dojo-contributors/2007-December/008531.html). I have made some small size reductions and I think I will close this ticket, leaving the API in _base.

If we want to look again at moving it before 1.1 we could open a new ticket.

Changed 10 months ago by simonjb

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.