Save current BZZZ config-ui state before CHORUS branding update
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
		
							
								
								
									
										31
									
								
								install/config-ui/node_modules/eslint-plugin-jsx-a11y/lib/util/implicitRoles/img.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								install/config-ui/node_modules/eslint-plugin-jsx-a11y/lib/util/implicitRoles/img.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| "use strict"; | ||||
|  | ||||
| Object.defineProperty(exports, "__esModule", { | ||||
|   value: true | ||||
| }); | ||||
| exports["default"] = getImplicitRoleForImg; | ||||
| var _jsxAstUtils = require("jsx-ast-utils"); | ||||
| /** | ||||
|  * Returns the implicit role for an img tag. | ||||
|  */ | ||||
| function getImplicitRoleForImg(attributes) { | ||||
|   var _getLiteralPropValue; | ||||
|   var alt = (0, _jsxAstUtils.getProp)(attributes, 'alt'); | ||||
|   if (alt && (0, _jsxAstUtils.getLiteralPropValue)(alt) === '') { | ||||
|     return ''; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * If the src attribute can be determined to be an svg, allow the role to be set to 'img' | ||||
|    * so that VoiceOver on Safari can be better supported. | ||||
|    * | ||||
|    * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#identifying_svg_as_an_image | ||||
|    * @see https://bugs.webkit.org/show_bug.cgi?id=216364 | ||||
|    */ | ||||
|   var src = (0, _jsxAstUtils.getProp)(attributes, 'src'); | ||||
|   if (src && (_getLiteralPropValue = (0, _jsxAstUtils.getLiteralPropValue)(src)) !== null && _getLiteralPropValue !== void 0 && _getLiteralPropValue.includes('.svg')) { | ||||
|     return ''; | ||||
|   } | ||||
|   return 'img'; | ||||
| } | ||||
| module.exports = exports.default; | ||||
		Reference in New Issue
	
	Block a user
	 anthonyrawlins
					anthonyrawlins