Skip to content

Commit 54e05a1

Browse files
committed
fix(tre): prefer aria-label over alt in img element model
1 parent d1a6186 commit 54e05a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/transient-render-engine/src/model/defaultHTMLElementModels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ const renderedEmbeddedModelMap: HTMLModelRecord<
558558
isVoid: true,
559559
getReactNativeProps({ attributes }) {
560560
// see https://w3c.github.io/html-aria/#el-img
561-
const label = attributes.alt || attributes['aria-label'];
561+
const label = attributes['aria-label'] || attributes.alt;
562562
if (label) {
563563
return {
564564
native: {

0 commit comments

Comments
 (0)