Add support for aria attributes

Reference: http://dev.w3.org/html5/markup/aria/aria.html#aria-attrs-all
This commit is contained in:
Andrew Le 2013-06-28 16:20:02 -07:00
parent 0cf6d99843
commit 27d8ca6a69
4 changed files with 11401 additions and 7552 deletions

View file

@ -738,6 +738,42 @@ typedef enum
TidyAttr_SRCDOC,
TidyAttr_SRCLANG,
TidyAttr_STEP,
TidyAttr_ARIA_ACTIVEDESCENDANT,
TidyAttr_ARIA_ATOMIC,
TidyAttr_ARIA_AUTOCOMPLETE,
TidyAttr_ARIA_BUSY,
TidyAttr_ARIA_CHECKED,
TidyAttr_ARIA_CONTROLS,
TidyAttr_ARIA_DESCRIBEDBY,
TidyAttr_ARIA_DISABLED,
TidyAttr_ARIA_DROPEFFECT,
TidyAttr_ARIA_EXPANDED,
TidyAttr_ARIA_FLOWTO,
TidyAttr_ARIA_GRABBED,
TidyAttr_ARIA_HASPOPUP,
TidyAttr_ARIA_HIDDEN,
TidyAttr_ARIA_INVALID,
TidyAttr_ARIA_LABEL,
TidyAttr_ARIA_LABELLEDBY,
TidyAttr_ARIA_LEVEL,
TidyAttr_ARIA_LIVE,
TidyAttr_ARIA_MULTILINE,
TidyAttr_ARIA_MULTISELECTABLE,
TidyAttr_ARIA_OWNS,
TidyAttr_ARIA_POSINSET,
TidyAttr_ARIA_PRESSED,
TidyAttr_ARIA_READONLY,
TidyAttr_ARIA_RELEVANT,
TidyAttr_ARIA_REQUIRED,
TidyAttr_ARIA_SELECTED,
TidyAttr_ARIA_SETSIZE,
TidyAttr_ARIA_SORT,
TidyAttr_ARIA_VALUEMAX,
TidyAttr_ARIA_VALUEMIN,
TidyAttr_ARIA_VALUENOW,
TidyAttr_ARIA_VALUETEXT,
N_TIDY_ATTRIBS /**< Must be last */
@ -747,3 +783,4 @@ typedef enum
} /* extern "C" */
#endif
#endif /* __TIDYENUM_H__ */

File diff suppressed because it is too large Load diff

View file

@ -355,6 +355,42 @@ static const Attribute attribute_defs [] =
{ TidyAttr_SRCLANG, "srclang", CH_PCDATA },
{ TidyAttr_STEP, "step", CH_PCDATA },
/* HTML5 Aria Attributes */
{ TidyAttr_ARIA_ACTIVEDESCENDANT, "aria-activedescendant", CH_PCDATA },
{ TidyAttr_ARIA_ATOMIC, "aria-atomic", CH_PCDATA },
{ TidyAttr_ARIA_AUTOCOMPLETE, "aria-autocomplete", CH_PCDATA },
{ TidyAttr_ARIA_BUSY, "aria-busy", CH_PCDATA },
{ TidyAttr_ARIA_CHECKED, "aria-checked", CH_PCDATA },
{ TidyAttr_ARIA_CONTROLS, "aria-controls", CH_PCDATA },
{ TidyAttr_ARIA_DESCRIBEDBY, "aria-describedby", CH_PCDATA },
{ TidyAttr_ARIA_DISABLED, "aria-disabled", CH_PCDATA },
{ TidyAttr_ARIA_DROPEFFECT, "aria-dropeffect", CH_PCDATA },
{ TidyAttr_ARIA_EXPANDED, "aria-expanded", CH_PCDATA },
{ TidyAttr_ARIA_FLOWTO, "aria-flowto", CH_PCDATA },
{ TidyAttr_ARIA_GRABBED, "aria-grabbed", CH_PCDATA },
{ TidyAttr_ARIA_HASPOPUP, "aria-haspopup", CH_PCDATA },
{ TidyAttr_ARIA_HIDDEN, "aria-hidden", CH_PCDATA },
{ TidyAttr_ARIA_INVALID, "aria-invalid", CH_PCDATA },
{ TidyAttr_ARIA_LABEL, "aria-label", CH_PCDATA },
{ TidyAttr_ARIA_LABELLEDBY, "aria-labelledby", CH_PCDATA },
{ TidyAttr_ARIA_LEVEL, "aria-level", CH_PCDATA },
{ TidyAttr_ARIA_LIVE, "aria-live", CH_PCDATA },
{ TidyAttr_ARIA_MULTILINE, "aria-multiline", CH_PCDATA },
{ TidyAttr_ARIA_MULTISELECTABLE, "aria-multiselectable", CH_PCDATA },
{ TidyAttr_ARIA_OWNS, "aria-owns", CH_PCDATA },
{ TidyAttr_ARIA_POSINSET, "aria-posinset", CH_PCDATA },
{ TidyAttr_ARIA_PRESSED, "aria-pressed", CH_PCDATA },
{ TidyAttr_ARIA_READONLY, "aria-readonly", CH_PCDATA },
{ TidyAttr_ARIA_RELEVANT, "aria-relevant", CH_PCDATA },
{ TidyAttr_ARIA_REQUIRED, "aria-required", CH_PCDATA },
{ TidyAttr_ARIA_SELECTED, "aria-selected", CH_PCDATA },
{ TidyAttr_ARIA_SETSIZE, "aria-setsize", CH_PCDATA },
{ TidyAttr_ARIA_SORT, "aria-sort", CH_PCDATA },
{ TidyAttr_ARIA_VALUEMAX, "aria-valuemax", CH_PCDATA },
{ TidyAttr_ARIA_VALUEMIN, "aria-valuemin", CH_PCDATA },
{ TidyAttr_ARIA_VALUENOW, "aria-valuenow", CH_PCDATA },
{ TidyAttr_ARIA_VALUETEXT, "aria-valuetext", CH_PCDATA },
/* this must be the final entry */
{ N_TIDY_ATTRIBS, NULL, NULL }
};

View file

@ -311,6 +311,41 @@ uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
#define attrIsXMLNS(av) AttrIsId( av, TidyAttr_XMLNS )
#define attrIsXML_LANG(av) AttrIsId( av, TidyAttr_XML_LANG )
#define attrIsXML_SPACE(av) AttrIsId( av, TidyAttr_XML_SPACE )
#define attrIsARIA_ACTIVEDESCENDANT(av) AttrIsId( av, TidyAttr_ARIA_ACTIVEDESCENDANT )
#define attrIsARIA_ATOMIC(av) AttrIsId( av, TidyAttr_ARIA_ATOMIC )
#define attrIsARIA_AUTOCOMPLETE(av) AttrIsId( av, TidyAttr_ARIA_AUTOCOMPLETE )
#define attrIsARIA_BUSY(av) AttrIsId( av, TidyAttr_ARIA_BUSY )
#define attrIsARIA_CHECKED(av) AttrIsId( av, TidyAttr_ARIA_CHECKED )
#define attrIsARIA_CONTROLS(av) AttrIsId( av, TidyAttr_ARIA_CONTROLS )
#define attrIsARIA_DESCRIBEDBY(av) AttrIsId( av, TidyAttr_ARIA_DESCRIBEDBY )
#define attrIsARIA_DISABLED(av) AttrIsId( av, TidyAttr_ARIA_DISABLED )
#define attrIsARIA_DROPEFFECT(av) AttrIsId( av, TidyAttr_ARIA_DROPEFFECT )
#define attrIsARIA_EXPANDED(av) AttrIsId( av, TidyAttr_ARIA_EXPANDED )
#define attrIsARIA_FLOWTO(av) AttrIsId( av, TidyAttr_ARIA_FLOWTO )
#define attrIsARIA_GRABBED(av) AttrIsId( av, TidyAttr_ARIA_GRABBED )
#define attrIsARIA_HASPOPUP(av) AttrIsId( av, TidyAttr_ARIA_HASPOPUP )
#define attrIsARIA_HIDDEN(av) AttrIsId( av, TidyAttr_ARIA_HIDDEN )
#define attrIsARIA_INVALID(av) AttrIsId( av, TidyAttr_ARIA_INVALID )
#define attrIsARIA_LABEL(av) AttrIsId( av, TidyAttr_ARIA_LABEL )
#define attrIsARIA_LABELLEDBY(av) AttrIsId( av, TidyAttr_ARIA_LABELLEDBY )
#define attrIsARIA_LEVEL(av) AttrIsId( av, TidyAttr_ARIA_LEVEL )
#define attrIsARIA_LIVE(av) AttrIsId( av, TidyAttr_ARIA_LIVE )
#define attrIsARIA_MULTILINE(av) AttrIsId( av, TidyAttr_ARIA_MULTILINE )
#define attrIsARIA_MULTISELECTABLE(av) AttrIsId( av, TidyAttr_ARIA_MULTISELECTABLE )
#define attrIsARIA_OWNS(av) AttrIsId( av, TidyAttr_ARIA_OWNS )
#define attrIsARIA_POSINSET(av) AttrIsId( av, TidyAttr_ARIA_POSINSET )
#define attrIsARIA_PRESSED(av) AttrIsId( av, TidyAttr_ARIA_PRESSED )
#define attrIsARIA_READONLY(av) AttrIsId( av, TidyAttr_ARIA_READONLY )
#define attrIsARIA_RELEVANT(av) AttrIsId( av, TidyAttr_ARIA_RELEVANT )
#define attrIsARIA_REQUIRED(av) AttrIsId( av, TidyAttr_ARIA_REQUIRED )
#define attrIsARIA_SELECTED(av) AttrIsId( av, TidyAttr_ARIA_SELECTED )
#define attrIsARIA_SETSIZE(av) AttrIsId( av, TidyAttr_ARIA_SETSIZE )
#define attrIsARIA_SORT(av) AttrIsId( av, TidyAttr_ARIA_SORT )
#define attrIsARIA_VALUEMAX(av) AttrIsId( av, TidyAttr_ARIA_VALUEMAX )
#define attrIsARIA_VALUEMIN(av) AttrIsId( av, TidyAttr_ARIA_VALUEMIN )
#define attrIsARIA_VALUENOW(av) AttrIsId( av, TidyAttr_ARIA_VALUENOW )
#define attrIsARIA_VALUETEXT(av) AttrIsId( av, TidyAttr_ARIA_VALUETEXT )
/* Attribute Retrieval macros
@ -367,4 +402,39 @@ uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
#define attrGetBASEFONT( nod ) TY_(AttrGetById)( nod, TidyAttr_BASEFONT )
#define attrGetROWSPAN( nod ) TY_(AttrGetById)( nod, TidyAttr_ROWSPAN )
#define attrGetARIA_ACTIVEDESCENDANT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ACTIVEDESCENDANT )
#define attrGetARIA_ATOMIC( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ATOMIC )
#define attrGetARIA_AUTOCOMPLETE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_AUTOCOMPLETE )
#define attrGetARIA_BUSY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_BUSY )
#define attrGetARIA_CHECKED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_CHECKED )
#define attrGetARIA_CONTROLS( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_CONTROLS )
#define attrGetARIA_DESCRIBEDBY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DESCRIBEDBY )
#define attrGetARIA_DISABLED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DISABLED )
#define attrGetARIA_DROPEFFECT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DROPEFFECT )
#define attrGetARIA_EXPANDED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_EXPANDED )
#define attrGetARIA_FLOWTO( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_FLOWTO )
#define attrGetARIA_GRABBED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_GRABBED )
#define attrGetARIA_HASPOPUP( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_HASPOPUP )
#define attrGetARIA_HIDDEN( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_HIDDEN )
#define attrGetARIA_INVALID( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_INVALID )
#define attrGetARIA_LABEL( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LABEL )
#define attrGetARIA_LABELLEDBY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LABELLEDBY )
#define attrGetARIA_LEVEL( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LEVEL )
#define attrGetARIA_LIVE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LIVE )
#define attrGetARIA_MULTILINE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_MULTILINE )
#define attrGetARIA_MULTISELECTABLE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_MULTISELECTABLE )
#define attrGetARIA_OWNS( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_OWNS )
#define attrGetARIA_POSINSET( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_POSINSET )
#define attrGetARIA_PRESSED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_PRESSED )
#define attrGetARIA_READONLY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_READONLY )
#define attrGetARIA_RELEVANT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_RELEVANT )
#define attrGetARIA_REQUIRED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_REQUIRED )
#define attrGetARIA_SELECTED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SELECTED )
#define attrGetARIA_SETSIZE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SETSIZE )
#define attrGetARIA_SORT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SORT )
#define attrGetARIA_VALUEMAX( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUEMAX )
#define attrGetARIA_VALUEMIN( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUEMIN )
#define attrGetARIA_VALUENOW( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUENOW )
#define attrGetARIA_VALUETEXT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUETEXT )
#endif /* __ATTRS_H__ */