Re: Agenda: March 24, 2014 WAI-PF ARIA Caucus

I forgot to connect the dots to Web Components, but this could use the cat/hat selectors or author-exposed pseudos to interact with the shadow DOM.

On Mar 24, 2014, at 12:04 AM, James Craig <jcraig@apple.com> wrote:

> On Mar 23, 2014, at 8:32 AM, Richard Schwerdtfeger <schwer@us.ibm.com> wrote:
> 
>> - Dominic Mazzoni (Google) request -
> 
> Just a reminder to Dominic and others to please send requests like this into the main email list, formal comments email, W3C Tracker (you’re a WG member), or even the Bugzilla tracker.
> 
>> Wants to form an effort to deal with ID references from DOM to WebComponent (http://www.w3.org/TR/components-intro/) subdom. How to handle (process-wise).   e.g.: You can't do use aria-activedescendant to reference an id in a descendant of a web component.  
> 
> I’ve been thinking about the (long-term) possibility of leveraging document.querySelector for this and other attributes that are currently IDREF-based. It would make a lot of things easier, but it would be more difficult to have a reflected content attribute, or to connect this in declarative markup. 
> 
> You could still use IDREFs.
> 
>    tree.ariaActiveDescendant = tree.querySelector('#foo');
> 
> But it’d be possible to point to elements that did not have a defined ID.
> 
>    tree.ariaActiveDescendant = tree.querySelector('[aria-selected="true"]');
> 
> And you could leverage the proposed CSS4 computed role selector. This dialog would be labeled by the first heading inside it, which includes elements using explicit role or native implicit role for h1, h2, etc.)
> 
>    dialog.ariaLabelledBy = [dialog.querySelector('*:role(heading)')]; // Array b/c labelledby take IDREFS not just IDREF.
> 
> I’m not sure we should open up a property on Element for every ARIA attribute though. Maybe something more general like a setReference method:
> 
>    // Dialog is labelled by the first heading inside it plus the value of the global element with class username.
>    dialog.setReference("aria-labelledby", [
>        dialog.querySelector('*:role(heading)’),
> 	document.querySelector('.username’)
>    ]);
> 
> The main drawback I see is that there’d be no way to have a reflected DOM attribute, so it’d be a little harder for authors to see and debug. Dev tools could help with that, though.
> 
> 	<dialog aria-labelledby="???”>…</dialog>
> 
> Thoughts?
> James
> 
> 

Received on Monday, 24 March 2014 07:13:57 UTC