From ae6cb525b17a57f984869bcab32c49157731e373 Mon Sep 17 00:00:00 2001 From: James Craig Date: Mon, 12 Feb 2018 02:11:22 -0800 Subject: [PATCH] rough draft for Issue #691: attribute reflection --- index.html | 98 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index d0743563c..873105711 100644 --- a/index.html +++ b/index.html @@ -74,21 +74,20 @@ companyURI: "http://www.w3.org", w3cid: 34017 }, - { name: "Richard Schwerdtfeger", - mailto: "schwer@us.ibm.com", - company: "IBM Corporation", - companyURI: "http://www.ibm.com/", - w3cid: 2460, - note: "until October 2017" - }, { name: "James Craig", - url: 'https://www.apple.com', + url: 'https://www.apple.com/accessibility/', mailto: "jcraig@apple.com", company: "Apple Inc.", companyURI: "https://www.apple.com", w3cid: 42459, - note: "until May 2016" + }, + { name: "Richard Schwerdtfeger", + mailto: "schwer@us.ibm.com", + company: "IBM Corporation", + companyURI: "http://www.ibm.com/", + w3cid: 2460, + note: "until October 2017" } ], @@ -10975,6 +10974,87 @@

State and Property Attribute Processing

Sometimes states and properties are present in the DOM but have a zero-length string ("") as their value. This is equivalent to their absence. User agents SHOULD treat state and property attributes with a value of "" the same as they treat an absent attribute. For supported states and properties, this corresponds to the default value, but if it is a required attribute, it signals an author error, and the implicit value for the role is used.

+
+

DOM Interface

+
+

This is pretty rough. Pushing a branch mainly to see if people think creating a new section is the right choice, or if these should be worked into the respective Role and States/Props sections, with an IDL index list. ReSpec automatic listing would work on single-page version, but maybe not the split versions. -jc

+

Remember to:

+
    +
  • Write intro for the IDL section, including example usage in JavaScript.
  • +
  • Note that "tabIndex" IDL is defined elsewhere.
  • +
  • Fix all the ReSpec errors.
  • +
  • Update the changelog.
  • +
+
+ +
+

WebIDL Definition

+

The Element interface is defined by the W3C [[DOM]].

+
+			partial interface Element {
+				// Does role need to be defined in a different spec?
+				attribute DOMString role;
+			};
+		
+
+			partial interface Element {
+				attribute DOMString ariaActiveDescendant; 
+				attribute DOMString ariaAtomic; 
+				attribute DOMString ariaAutoComplete;
+				attribute DOMString ariaBusy;
+				attribute DOMString ariaChecked;
+				attribute DOMString ariaColCount;
+				attribute DOMString ariaColIndex;
+				attribute DOMString ariaColSpan;
+				attribute DOMString ariaControls;
+				attribute DOMString ariaCurrent;
+				attribute DOMString ariaDescribedBy;
+				attribute DOMString ariaDetails;
+				attribute DOMString ariaDisabled;
+				attribute DOMString ariaErrorMessage;
+				attribute DOMString ariaExpanded;
+				attribute DOMString ariaFlowTo;
+				attribute DOMString ariaHasPopup;
+				attribute DOMString ariaHidden;
+				attribute DOMString ariaInvalid;
+				attribute DOMString ariaKeyShortcuts;
+				attribute DOMString ariaLabel;
+				attribute DOMString ariaLabelledBy;
+				attribute DOMString ariaLevel;
+				attribute DOMString ariaLive;
+				attribute DOMString ariaModal;
+				// Note: @aria-multiline reflected as ariaMultiline, not ariaMultiLine.
+				attribute DOMString ariaMultiline;
+				// Note: @aria-multiselectable reflected as ariaMultiselectable, not ariaMultiSelectable.
+				attribute DOMString ariaMultiselectable;
+				attribute DOMString ariaOrientation;
+				attribute DOMString ariaOwns;
+				// Note: @aria-placeholder reflected as ariaPlaceholder, not ariaPlaceHolder.
+				attribute DOMString ariaPlaceholder;
+				// Note: @aria-posinset reflected as ariaPosInSet, not ariaPosInset.
+				attribute DOMString ariaPosInSet;
+				attribute DOMString ariaPressed;
+				// Note: @aria-readonly reflected as ariaReadonly, not ariaReadOnly.
+				attribute DOMString ariaReadonly;
+				attribute DOMString ariaRelevant;
+				attribute DOMString ariaRequired;
+				attribute DOMString ariaRoleDescription;
+				attribute DOMString ariaRowCount;
+				attribute DOMString ariaRowIndex;
+				attribute DOMString ariaRowSpan;
+				attribute DOMString ariaSelected;
+				attribute DOMString ariaSetSize;
+				attribute DOMString ariaSort;
+				attribute DOMString ariaValueMax;
+				attribute DOMString ariaValueMin;
+				attribute DOMString ariaValueNow;
+				attribute DOMString ariaValueText;
+			};
+		
+
+

Note: Attributes aria-dropeffect and aria-grabbed were deprecated in ARIA 1.1 and do not have reflected DOM properties.

+

Seems harmless to include these two deprecated attrs as IDL props, so if anyone has a strong preference, we could include them. On the flip-side, we could add some normative requirement to avoid them, "Implementors SHOULD NOT create new implementions of deprecated attributes." -jc

+

Schemata

WAI-ARIA roles, states, and properties are available in a number of machine-readable formats to support validation of content using WAI-ARIA attributes. WAI-ARIA is not finalized, however, so these files are subject to change without notice. Todo: Remove disclaimers about not final at rec.