/*
 * Copyright (c) 2018, 2026, 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="oj-tsx-aria-prop";const LONG="Attributes beginning with <i>'aria-'</i> must be valid WAI-ARIA definitions.";const JSX_SPREAD_ATTRIBUTE="JSXSpreadAttribute";function Rule(){};Rule.prototype.getName=function(){return RULE};Rule.prototype.getShortDescription=function(){return LONG};Rule.prototype.getDescription=function(){return LONG};Rule.prototype.register=function(regCtx){this._tsxUtils=regCtx.utils.tsxUtils;return{"TsxAria":this._onProp}};Rule.prototype._onProp=function(ruleCtx,tsxProp){if(!this._tsxUtils.isAriaAttr(tsxProp.name)){let issue=new ruleCtx.Issue(`<${tsxProp.parent.name}> attribute '${tsxProp.name}' is not a valid WAI-ARIA definition`);this._tsxUtils.setIssuePosition(issue,tsxProp);ruleCtx.reporter.addIssue(issue,ruleCtx)}};module.exports=Rule;