summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2014-05-12 09:25:40 (EDT)
committerNick Sandonato2014-05-15 15:34:49 (EDT)
commit3863a1ea4330b78b9abcca036b63f9e046bee364 (patch)
tree3ed989a4b57d440d88960700454d8764f50a3a51
parentecb9d0cb9b46b6cac269343056d916c33c0b4f43 (diff)
downloadwebtools.sourceediting-3863a1ea4330b78b9abcca036b63f9e046bee364.zip
webtools.sourceediting-3863a1ea4330b78b9abcca036b63f9e046bee364.tar.gz
webtools.sourceediting-3863a1ea4330b78b9abcca036b63f9e046bee364.tar.bz2
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.java14
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 eb618b3..233c47e 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;
}