/*
 * 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 RULENAME="oj-acc-aria-accessible";const DESCRIPTION="For components <oj-c-rating-gauge>, <oj-c-meter-bar>, or <oj-c-meter-circle> to be "+"accessible, one of the following WAI-ARIA attributes:<br>"+"1) 'aria-label', 'aria-labelledby', or 'aria-describedby'<br>"+"or one of these attributes:<br>"+"2) 'labelled-by', or 'described-by'<br>"+"is required.";const SHORT_DESCRIPTION="<oj-c-rating-gauge>, <oj-c-meter-bar>, or <oj-c-meter-circle> require one of these attributes - 'aria-label', 'aria-labelledby', "+"'aria-describedby', 'labelled-by', or 'described-by', to be accessible";const ARIA_ATTRIBS=["aria-label","aria-labelledby","aria-describedby","labelled-by","described-by"];class Rule{getName(){return RULENAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(){return{"<oj-c-rating-gauge>":this._onComp,"<oj-c-meter-bar>":this._onComp,"<oj-c-meter-circle>":this._onComp}}_onComp(ruleCtx){var attribs,attrib;if(attribs=ruleCtx.tagNode.attribs){for(attrib in attribs){if(ARIA_ATTRIBS.includes(attrib)){return}}this._emitIssue(ruleCtx)}}_emitIssue(ruleCtx){var issue,msg;msg=`For <${ruleCtx.tagNode.name}> accessibility, either 'aria-label', 'aria-labelledby', 'aria-describedby', 'labelled-by' or 'described-by' must be set.`;issue=new ruleCtx.Issue(msg);ruleCtx.reporter.addIssue(issue,ruleCtx)}}module.exports=Rule;