/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULE_NAME="oj-acc-aria-prop";const DESCRIPTION="Attributes beginning with <i>'aria-'</i> must be valid WAI-ARIA definitions.";const ARIA="aria-";function getName(){return RULE_NAME};function getShortDescription(){return DESCRIPTION};function getDescription(){return DESCRIPTION};function register(){return{"elem":_onElem}};function _onElem(ruleCtx){var attribs,attrib;attribs=ruleCtx.tagNode.attribs;if(attribs){for(attrib in attribs){let DomUtils=ruleCtx.utils.DomUtils;if(attrib.startsWith(ARIA)){if(!DomUtils.isAriaAttr(attrib)){let issue=new ruleCtx.Issue("<"+ruleCtx.tagNode.name+"> '"+attrib+"' is not a valid WAI-ARIA definition");let attrPos=DomUtils.getAttribPosition(ruleCtx.data,ruleCtx.node,attrib);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}}};module.exports={getName,getDescription,getShortDescription,register};