This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23365 - modify focus steps to move focus to dialog by default
Summary: modify focus steps to move focus to dialog by default
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y
Depends on:
Blocks: 23366
  Show dependency treegraph
 
Reported: 2013-09-26 12:54 UTC by steve faulkner
Modified: 2014-01-16 15:10 UTC (History)
7 users (show)

See Also:


Attachments

Description steve faulkner 2013-09-26 12:54:15 UTC
"Let control be the first element in tree order whose nearest ancestor dialog element is subject and that has an autofocus attribute specified, if any."


modify this so that focus moves by default(does not need author to do). 

this will make it much better for keyboard/screen reader/screen mag users.
Comment 1 github bugzilla bot 2013-09-26 12:57:33 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/210ea0850ab98bc566f575f4a7913074ea88b6b2
make focus move to dialog

see bug 23365
Comment 2 steve faulkner 2013-09-26 13:02:07 UTC
rationale: currently moving focus to a dialog relies upon the author setting autofocus on one of the focusable elements in the dialog. As we know authors don't often think about keyboard interaction and if autofocus is not set it will 9as it is currently with custom dialogs) be problematic for SR,keyboard users and screen mag users.
Comment 3 steve faulkner 2013-09-26 13:14:12 UTC
see chrome bug - http://code.google.com/p/chromium/issues/detail?id=264959
Comment 4 Matt Falkenhagen 2013-09-26 13:50:48 UTC
""Let control be the first focusable element in tree order whose nearest ancestor dialog element is subject or that has an autofocus attribute specified."

Maybe it should be more explicit that autofocus has priority?
Comment 5 alexander surkov 2013-09-26 15:55:33 UTC
(In reply to Matt Falkenhagen from comment #4)
> ""Let control be the first focusable element in tree order whose nearest
> ancestor dialog element is subject or that has an autofocus attribute
> specified."
> 
> Maybe it should be more explicit that autofocus has priority?

agree since the statement form is "x or y" then the statement is true whenever x is true, so it can be read as focus first focusable control, otherwise focus unfocusable element having autfocus attribute.

Also, a note, if the change concerns to modal dialogs only then it's probably fine since modal dialogs must take focus always but it'd double check that.
Comment 6 Matt Falkenhagen 2013-09-26 17:29:01 UTC
(In reply to alexander surkov from comment #5)
> (In reply to Matt Falkenhagen from comment #4)
> > ""Let control be the first focusable element in tree order whose nearest
> > ancestor dialog element is subject or that has an autofocus attribute
> > specified."
> > 
> > Maybe it should be more explicit that autofocus has priority?
> 
> agree since the statement form is "x or y" then the statement is true
> whenever x is true, so it can be read as focus first focusable control,
> otherwise focus unfocusable element having autfocus attribute.

True though what I was worried more about is ambiguity over whether the first element in tree order or an element with autofocus gets focus.
Comment 7 steve faulkner 2013-10-10 13:44:34 UTC
reverted commit, leaving it up to the acc engineers to work it out with hixie
Comment 8 alexander surkov 2013-10-10 13:48:48 UTC
(In reply to steve faulkner from comment #7)
> reverted commit, leaving it up to the acc engineers to work it out with hixie

how it could be wontfix if the fix was landed (comment #1)? Honestly I'm getting confused with number of bugs related to dialog element we have.
Comment 9 steve faulkner 2013-10-10 14:03:12 UTC
(In reply to alexander surkov from comment #8)
> (In reply to steve faulkner from comment #7)
> > reverted commit, leaving it up to the acc engineers to work it out with hixie
> 
> how it could be wontfix if the fix was landed (comment #1)? Honestly I'm
> getting confused with number of bugs related to dialog element we have.

i reverted the fix
Comment 10 alexander surkov 2013-10-10 14:21:38 UTC
so the reason of wontfix is as soon as twin WHATWG bug is fixed then the change automatically goes into W3C spec. Correct?
Comment 11 steve faulkner 2013-10-10 14:28:40 UTC
(In reply to alexander surkov from comment #10)
> so the reason of wontfix is as soon as twin WHATWG bug is fixed then the
> change automatically goes into W3C spec. Correct?

when/if the whatwg commit comes along unless anybody objects it will be
committed to the HTML spec.
Comment 12 steve faulkner 2013-10-10 14:37:46 UTC
(In reply to steve faulkner from comment #9)
> (In reply to alexander surkov from comment #8)
> > (In reply to steve faulkner from comment #7)
> > > reverted commit, leaving it up to the acc engineers to work it out with hixie
> > 
> > how it could be wontfix if the fix was landed (comment #1)? Honestly I'm
> > getting confused with number of bugs related to dialog element we have.
> 
> i reverted the fix

> Honestly I'm
> getting confused with number of bugs related to dialog element we have.

that's why i closed this one.
Comment 14 github bugzilla bot 2014-01-16 15:10:57 UTC
Commit pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/210ea0850ab98bc566f575f4a7913074ea88b6b2
make focus move to dialog