Re: Disabling user focus for an entire section (Was: Spec does not appear to define what it means to be a "modal" dialog (e.g. focus concerns should be included))

Hi James,

If you want the inert attribute to be added to HTML5.0, you should suggest
it on the main HTML WG mailing list so it can be discussed. It would be
easy for the editors to add it, since it already exists in the WHATWG spec,
but nobody has asked for it yet. If you can show that it's implemented in
browsers, it will be simple to add. You will likely have to write an
extension spec, which should be simple because it already exists in the
WHATWG spec.

HTH,
Silvia.

On Fri, Nov 9, 2012 at 9:23 AM, James Craig <jcraig@apple.com> wrote:

> As Silvia pointed out, there is a way for a subtree to be marked as
> "inert" which would solve this problem.
> http://www.w3.org/TR/html5/editing.html#inert-subtrees
>
> Also, there is a proposed inert="" attribute on whatwg, for which I'd like
> to express strong support.
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-inert-attribute
>
>
> On Nov 8, 2012, at 12:55 PM, James Craig <jcraig@apple.com> wrote:
>
> > On a related note, this does not cover where you want to mark an entire
> section as "disabled" (e.g. don't focus anything in this section) without
> disabling other sections of the page.
> >
> > For example, in carousels, you may want to leave side panel contents
> partially visible (a common visual effect) but prevent users from tabbing
> directly to the inactive content, but you would not want the frontmost
> carousel panel to be "modal" as this would prevent interaction and focus
> elsewhere in the document. Currently, you have to loop through all
> focusable descendants of the inactive panel, store their current tabindex
> value, and set the new tabindex value to -1. There should be a better way
> to do this. We could potentially increase the scope of the disabled
> attribute to apply to containers, or perhaps have a new tabindex value
> ("-2"?) that overrides the tabindex for descendant nodes.
> >
> > James
> >
> >
> > On Nov 8, 2012, at 12:48 PM, James Craig <jcraig@apple.com> wrote:
> >
> >> One clarification inline.
> >>
> >> On Nov 8, 2012, at 12:46 PM, James Craig <jcraig@apple.com> wrote:
> >>
> >>> I don't see a definition for "modal" in the spec section for the
> dialog element.
> >>> http://dev.w3.org/html5/spec-preview/commands.html#the-dialog-element
> >>>
> >>> Presumably dialog.showModal() would prevent interaction
> >>
> >> In case it's not clear, I should clarify I meant prevent interaction
> *of background contents* not of content inside the dialog.
> >>
> >>> in any modality (including keyboard focusability), but as far as I can
> see, it does not state anything to that effect. Unless I hear a correction,
> I'll file a defect.
> >>>
> >>>
> >>>
> >>
> >>
> >
>
>

Received on Saturday, 10 November 2012 01:56:22 UTC