/*
 * 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-film-strip-aria-label";function getName(){return RULE_NAME};function getShortDescription(){return"<oj-film-strip> must have an 'aria-label' or an 'aria-labelledby' attribute"};function getDescription(){return"For accessibility, <oj-film-strip> must have an <i>'aria-label'</i> or an 'aria-labelledby'</i> attribute."};function register(){return{"<oj-film-strip>":_onTag}};function _onTag(ruleCtx){var attribs,attrib,attrib2,haveAriaLabel,dataBind,issue;if(!(attribs=ruleCtx.node.attribs)){return}for(attrib in attribs){attrib2=attrib.charAt(0)===":"?attrib.substr(1):attrib;if(attrib2==="aria-label"||attrib2==="aria-labelledby"){haveAriaLabel=true;break}else if(attrib2==="data-bind"){dataBind=attrib2}}if(!haveAriaLabel&&dataBind){dataBind=ruleCtx.utils.DomUtils.getAttribValue(ruleCtx.node,dataBind);haveAriaLabel=_inspectDataBind(dataBind)}if(!haveAriaLabel){issue=new ruleCtx.Issue("'aria-label' or 'aria-labelledby' missing on <oj-film-strip>");ruleCtx.reporter.addIssue(issue,ruleCtx)}};function _inspectDataBind(attr){var ret=false,i;attr=attr?attr.trim().toLowerCase():null;if(!attr||!attr.length){return ret}i=attr.indexOf("attr");if(i<0){return ret}attr=attr.substr(i+4).trim();if(attr.length){if(attr.charAt(0)===":"){attr=attr.substr(1).trim();if(attr.charAt(0)==="{"){attr=attr.substr(1).trim().split(":");if(attr.length>1){attr[0]=attr[0].trim();ret=attr[0].indexOf("aria-label")>=0||attr[0].indexOf("aria-labelledby")>=0}}}}return ret};module.exports={getName,getDescription,getShortDescription,register};