/*
 * 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 helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-combobox-aria-label";const DESCRIPTION="For accessibility, a combobox element must have a matching <oj-label> with a <i>'for'</i> matching the input element <i>'id'</i>"+", or an <i>aria-label</i> attribute.<p>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<p>"+"Set 'label-hint' or associate an 'oj-label'.  If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, a combobox element must have a matching <oj-label> with a 'for' matching the combobox 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"<oj-combobox-many>":this._onCombo,"<oj-combobox-one>":this._onCombo}}_onCombo(ruleCtx,tagName){var issues;if(issues=helper(ruleCtx,tagName,this._theme)){issues.forEach(issue=>{ruleCtx.reporter.addIssue(issue,ruleCtx)})}}}module.exports=Rule;