Opened 12 years ago

Closed 9 years ago

#2718 closed defect (fixed)

make widget templates validate

Reported by: bill Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit Version: 0.9
Keywords: Cc: Becky Gibson
Blocked By: Blocking:

Description (last modified by bill)

If possible, remove <div> inside of <span> (either use <div>/<div> or <span>/<span>, with appropriate CSS), and also stop using <fieldset> for formatting reasons.

Have to test to see if this is possible. If not we will just close the bug as "won't fix". But at a minimum, need to change formatting fieldsets to have <fieldset waiRole=presentation> so screen readers don't get confused.

Change History (18)

comment:1 Changed 12 years ago by bill

Component: WidgetsDijit

comment:2 Changed 12 years ago by bill

Milestone: 0.9beta1.0

comment:3 Changed 12 years ago by Adam Peller

(In [9867]) Refs #2718

comment:4 Changed 12 years ago by Adam Peller

(In [9868]) Refs #2718

comment:5 Changed 12 years ago by bill

(In [10698]) Add waiRole="presentation" for all <fieldset> tags (there's only this one tag left in dijit). Refs #2718.

comment:6 Changed 12 years ago by bill

Milestone: 1.02.0

comment:7 Changed 12 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:8 Changed 11 years ago by bill

Milestone: 1.31.4

bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4

comment:9 Changed 10 years ago by bill

Description: modified (diff)
Milestone: 1.41.5

Might as well defer this until after lucid has been completed.

comment:10 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:11 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:12 Changed 9 years ago by bill

(In [22434]) fix syntax error (stray single quote), refs #2718

comment:13 Changed 9 years ago by bill

(In [22435]) type="button" is meaningless on a <span> tag, it's just leftover from when we were using a <button> tag. refs #11003, #2718

comment:14 Changed 9 years ago by bill

(In [22436]) need alt="" on <img> tags (for HTML correctness), refs #2718

comment:15 Changed 9 years ago by bill

I ran all of the templates in files through http://validator.w3.org/#validate_by_input+with_options and made a few fixes (the above checkins). The templates look good, with no nesting errors about span/div/fieldset. The two worrisome remaining things I see are:

  • (apparently) unnecessary tabIndex="-1" setting on <div>, <tr>, etc. See #11369 for problem that can cause.
  • readOnly flag (rather than readOnly="true" or readOnly="readOnly") may break XHTML strict mode. I guess people will tell us if that happens as we often get reports about XHTML compliance.

comment:16 Changed 9 years ago by bill

Cc: Becky Gibson added

CC'ing Becky to make sure changes don't break screen reader.

comment:17 Changed 9 years ago by bill

(In [22490]) Remove tabIndex setting from naturally non-focusable nodes (<div>, <table>, <ul>, etc.). Originally the tabIndex setting was needed for FF2 (and maybe FF3.0) when setting the (aria) role, but it's not needed anymore, and sometimes is harmful.

Didn't remove tabIndex setting for nodes that are eventually [programatically] focused: MenuItem, CheckedMenuItem, MenuBarItem, TreeNode. That's because tabindex is used as a cue to CssStateMixin to setup focus handlers on those nodes.

Fixes #11369, refs #2718 !strict.

comment:18 Changed 9 years ago by bill

Resolution: fixed
Status: newclosed

OK, I think I've done all I want to do for this ticket, so closing it. Obviously there are still certain things in the templates that aren't valid, like dojoAttachPoint and dojoAttachEvent calls themselves, but there are no glaring issues like in the old days.

Note: See TracTickets for help on using tickets.