diff options
author | vrubezhny | 2014-05-12 13:25:40 +0000 |
---|---|---|
committer | Nick Sandonato | 2014-05-15 19:34:49 +0000 |
commit | 3863a1ea4330b78b9abcca036b63f9e046bee364 (patch) | |
tree | 3ed989a4b57d440d88960700454d8764f50a3a51 | |
parent | ecb9d0cb9b46b6cac269343056d916c33c0b4f43 (diff) | |
download | webtools.sourceediting-3863a1ea4330b78b9abcca036b63f9e046bee364.tar.gz webtools.sourceediting-3863a1ea4330b78b9abcca036b63f9e046bee364.tar.xz webtools.sourceediting-3863a1ea4330b78b9abcca036b63f9e046bee364.zip |
Bug 434381 - HTML5 validation should allow the 'role' and 'aria-*' attributes.v201405151950
The 'role' and 'aria-*' attributes are made to be valid HTML5 attributes.
Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r-- | bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java index eb618b3d84..233c47e710 100644 --- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java +++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java @@ -74,8 +74,16 @@ public class HTMLAttributeValidator extends PrimeValidator { //WHATWG x-vendor-feature attributes private static final String ATTR_NAME_USER_AGENT_FEATURE = "x-"; //$NON-NLS-1$ private static final int ATTR_NAME_USER_AGENT_FEATURE_LENGTH = ATTR_NAME_USER_AGENT_FEATURE.length(); - + // D210422 + + // Accessible Rich Internet Applications (WAI-ARIA) + private static final String ATTR_NAME_WAI_ARIA_ROLE = "role"; //$NON-NLS-1$ + + private static final String ATTR_NAME_WAI_ARIA = "aria-"; //$NON-NLS-1$ + private static final int ATTR_NAME_WAI_ARIA_LENGTH = ATTR_NAME_WAI_ARIA.length(); + + /** * HTMLAttributeValidator constructor comment. */ @@ -173,7 +181,9 @@ public class HTMLAttributeValidator extends PrimeValidator { if (adec == null) { if ((attrName.startsWith(ATTR_NAME_DATA) && attrName.length() > ATTR_NAME_DATA_LENGTH) || - (attrName.startsWith(ATTR_NAME_USER_AGENT_FEATURE) && attrName.length() > ATTR_NAME_USER_AGENT_FEATURE_LENGTH)) { + (attrName.startsWith(ATTR_NAME_USER_AGENT_FEATURE) && attrName.length() > ATTR_NAME_USER_AGENT_FEATURE_LENGTH) || + attrName.equals(ATTR_NAME_WAI_ARIA_ROLE) || + (attrName.startsWith(ATTR_NAME_WAI_ARIA) && attrName.length() > ATTR_NAME_WAI_ARIA_LENGTH)) { if (isHTML5(target)) continue; } |