@wlloyalty/wll-react-sdk 1.0.103 → 1.0.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,7 @@ export declare const createBadgeTileMock: (config?: BadgeTileMockConfig) => {
23
23
  defaultLocale: string;
24
24
  locale: string;
25
25
  createdAt: string;
26
+ lastEarnedAt: string;
26
27
  updatedAt: string;
27
28
  awardedDatePrefix: string;
28
29
  emptyBadgeMessage: string;
@@ -106,6 +106,7 @@ export declare class BadgeTileConfig {
106
106
  emptyBadgeArtworkUrl?: string;
107
107
  awardedDatePrefix?: string;
108
108
  badgeNotEarnedMessage?: string;
109
+ lastEarnedAt?: string;
109
110
  }
110
111
  export type BadgeDetail = {
111
112
  name: string;
@@ -5,3 +5,16 @@ import { Tile } from '../types/tile';
5
5
  * @returns Sorted array of tiles
6
6
  */
7
7
  export declare const sortByPriority: <T extends Pick<Tile, "priority">>(tiles: T[]) => T[];
8
+ /**
9
+ * Transforms locale to a locale that is supported by the browser
10
+ * @param locale Two-letter locale code to transform (en, fr, etc.)
11
+ * @returns Full locale string (e.g., en-GB, fr-FR)
12
+ */
13
+ export declare const transformLocale: (locale?: string | null) => string;
14
+ /**
15
+ * Formats a date string to a localized date string based on user locale
16
+ * @param date Date string to format
17
+ * @param userLocale User's locale (defaults to 'en')
18
+ * @returns Formatted date string or fallback message
19
+ */
20
+ export declare const handleLastEarnedDate: (date?: string, userLocale?: string) => string;
package/dist/web.js CHANGED
@@ -18891,7 +18891,6 @@ var ProgressiveImage = function (_a) {
18891
18891
  var baseColor = theme.alphaDerivedPrimary[20];
18892
18892
  var desaturatedColor = desaturateColor(baseColor);
18893
18893
  var backgroundColor = isDesaturated ? desaturatedColor : baseColor;
18894
- // Create base animated image
18895
18894
  var baseImage = /*#__PURE__*/React.createElement(Animated$1.Image, __assign({}, props, {
18896
18895
  source: source,
18897
18896
  style: [styles$7.imageOverlay, __assign({
@@ -18900,7 +18899,9 @@ var ProgressiveImage = function (_a) {
18900
18899
  filter: isDesaturated ? 'grayscale(100%)' : undefined
18901
18900
  })],
18902
18901
  onLoad: onImageLoad,
18903
- accessibilityLabel: alt
18902
+ accessibilityLabel: alt,
18903
+ accessible: true,
18904
+ role: "img"
18904
18905
  }));
18905
18906
  return /*#__PURE__*/React.createElement(View$2, {
18906
18907
  style: [styles$7.container, style, {
@@ -19008,10 +19009,35 @@ var Text = function (_a) {
19008
19009
  fontFamily: theme.fontFamily
19009
19010
  } : {}
19010
19011
  });
19012
+ // Determine appropriate accessibility role based on variant
19013
+ // This helps screen readers understand the semantic meaning
19014
+ var accessibilityRole;
19015
+ switch (variant) {
19016
+ case 'title':
19017
+ accessibilityRole = 'header';
19018
+ break;
19019
+ case 'caption':
19020
+ accessibilityRole = 'text';
19021
+ break;
19022
+ case 'eyebrow':
19023
+ accessibilityRole = 'text';
19024
+ break;
19025
+ case 'description':
19026
+ accessibilityRole = 'paragraph';
19027
+ break;
19028
+ case 'label':
19029
+ accessibilityRole = 'text';
19030
+ break;
19031
+ default:
19032
+ accessibilityRole = 'text';
19033
+ }
19011
19034
  var combinedStyles = [styles.base, variantStyle, styles.webOverrides, style];
19012
19035
  return /*#__PURE__*/React__namespace.createElement(Text$3, __assign({
19013
19036
  style: combinedStyles
19014
- }, props));
19037
+ }, props, {
19038
+ accessible: true,
19039
+ role: accessibilityRole
19040
+ }));
19015
19041
  };
19016
19042
 
19017
19043
  var MAX_WIDTH = 1080;
@@ -19197,24 +19223,38 @@ var BaseBanner = function (_a) {
19197
19223
  ctaText = _b.ctaText;
19198
19224
  var handlePress = useHandleTilePress(tile, ctaLink, ctaLinkTarget);
19199
19225
  var hasCTA = Boolean(ctaText);
19200
- return /*#__PURE__*/React.createElement(BannerContext.Provider, {
19201
- value: tile
19202
- }, /*#__PURE__*/React.createElement(Pressable$1, {
19203
- testID: testID || 'banner-tile',
19204
- style: function (_a) {
19205
- var pressed = _a.pressed;
19206
- return [styles$6.container, style, {
19207
- backgroundColor: theme.surface,
19208
- borderRadius: theme.sizes.borderRadiusLg,
19209
- opacity: pressed ? 0.7 : 1
19210
- }];
19211
- },
19212
- onPress: hasCTA ? undefined : handlePress,
19213
- disabled: !ctaLink || hasCTA,
19214
- accessible: true,
19215
- role: hasCTA ? 'article' : 'button',
19216
- accessibilityLabel: accessibilityLabel || "".concat(title).concat(!hasCTA && ctaLink ? ' - Click to open' : '')
19217
- }, children));
19226
+ var isInteractive = Boolean(ctaLink && !hasCTA);
19227
+ var commonStyles = [styles$6.container, style, {
19228
+ backgroundColor: theme.surface,
19229
+ borderRadius: theme.sizes.borderRadiusLg
19230
+ }];
19231
+ if (isInteractive) {
19232
+ return /*#__PURE__*/React.createElement(BannerContext.Provider, {
19233
+ value: tile
19234
+ }, /*#__PURE__*/React.createElement(Pressable$1, {
19235
+ testID: testID || 'banner-tile',
19236
+ style: function (_a) {
19237
+ var pressed = _a.pressed;
19238
+ return __spreadArray(__spreadArray([], commonStyles, true), [{
19239
+ opacity: pressed ? 0.7 : 1
19240
+ }], false);
19241
+ },
19242
+ onPress: handlePress,
19243
+ accessible: true,
19244
+ role: "button",
19245
+ accessibilityLabel: accessibilityLabel || "".concat(title, " - Click to open")
19246
+ }, children));
19247
+ } else {
19248
+ return /*#__PURE__*/React.createElement(BannerContext.Provider, {
19249
+ value: tile
19250
+ }, /*#__PURE__*/React.createElement(View$2, {
19251
+ testID: testID || 'banner-tile',
19252
+ style: commonStyles,
19253
+ accessible: true,
19254
+ role: "article",
19255
+ accessibilityLabel: accessibilityLabel || title || 'Banner'
19256
+ }, children));
19257
+ }
19218
19258
  };
19219
19259
  var styles$6 = StyleSheet$1.create({
19220
19260
  container: {
@@ -19263,7 +19303,7 @@ var BaseTileBody = function (props) {
19263
19303
  return /*#__PURE__*/React.createElement(Text, __assign({
19264
19304
  variant: "body"
19265
19305
  }, props, {
19266
- accessibilityRole: "text",
19306
+ role: "article",
19267
19307
  accessibilityLabel: body,
19268
19308
  numberOfLines: getNumberOfLines(),
19269
19309
  testID: "tile-body"
@@ -19387,7 +19427,7 @@ var BaseTileContent = function (_a) {
19387
19427
  justifyContent: 'center',
19388
19428
  height: !artworkUrl ? '100%' : undefined
19389
19429
  }],
19390
- accessibilityRole: "none"
19430
+ role: "none"
19391
19431
  }, children);
19392
19432
  };
19393
19433
 
@@ -19415,7 +19455,7 @@ var BaseTileHeader = function (_a) {
19415
19455
  return /*#__PURE__*/React.createElement(View$2, {
19416
19456
  style: combinedStyle,
19417
19457
  testID: "tile-header",
19418
- accessibilityRole: "header"
19458
+ role: "heading"
19419
19459
  }, children);
19420
19460
  };
19421
19461
 
@@ -19441,7 +19481,7 @@ var BaseTileMedia = function (props) {
19441
19481
  testID: "tile-media",
19442
19482
  style: [props.style, baseStyles.media, styles.media],
19443
19483
  alt: "Content image".concat(title ? " for ".concat(title) : ''),
19444
- accessibilityRole: "image"
19484
+ role: "img"
19445
19485
  }));
19446
19486
  };
19447
19487
 
@@ -19467,7 +19507,7 @@ var BaseTileTitle = function () {
19467
19507
  if (isHalfSize && artworkUrl || !title) return null;
19468
19508
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
19469
19509
  variant: "title",
19470
- accessibilityRole: "header",
19510
+ role: "heading",
19471
19511
  accessibilityLabel: title,
19472
19512
  numberOfLines: 1,
19473
19513
  testID: "tile-title"
@@ -19496,10 +19536,7 @@ var useTileContext = function () {
19496
19536
  return context;
19497
19537
  };
19498
19538
  /**
19499
- * BaseTileContainer component to handle layout and pressable behavior.
19500
- *
19501
- * @param {BaseTileRootProps} props - Component props
19502
- * @returns {JSX.Element} The rendered BaseTileContainer
19539
+ * BaseTileContainer component with dynamic accessibility role based on CTA link
19503
19540
  */
19504
19541
  var BaseTileContainer = function (_a) {
19505
19542
  var children = _a.children,
@@ -19518,29 +19555,40 @@ var BaseTileContainer = function (_a) {
19518
19555
  surface: '#ffffff'
19519
19556
  };
19520
19557
  var handlePress = useHandleTilePress(tile, ctaLink, ctaLinkTarget);
19558
+ var isInteractive = Boolean(ctaLink || tile.type === 'REWARD' || tile.type === 'REWARD_CATEGORY');
19521
19559
  var layout = {
19522
19560
  flexDirection: 'column',
19523
19561
  justifyContent: isHalfSize ? 'center' : 'flex-start',
19524
19562
  alignItems: 'stretch'
19525
19563
  };
19526
19564
  var dynamicStyles = useBaseTileStyles();
19527
- return /*#__PURE__*/React.createElement(Pressable$1, {
19528
- style: function (_a) {
19529
- var pressed = _a.pressed;
19530
- return [baseStyles.container, dynamicStyles.container, {
19531
- backgroundColor: theme.surface,
19532
- opacity: pressed ? 0.7 : 1
19533
- }, layout, style];
19534
- },
19535
- onPress: handlePress,
19536
- disabled: tile.type !== 'REWARD' && tile.type !== 'REWARD_CATEGORY' && !ctaLink,
19537
- accessible: true,
19538
- accessibilityRole: "button",
19539
- accessibilityLabel: "".concat(title).concat(ctaLink ? ' - Click to open' : ''),
19540
- accessibilityState: {
19541
- disabled: !ctaLink
19542
- }
19543
- }, children);
19565
+ if (isInteractive) {
19566
+ return /*#__PURE__*/React.createElement(Pressable$1, {
19567
+ style: function (_a) {
19568
+ var pressed = _a.pressed;
19569
+ return [baseStyles.container, dynamicStyles.container, {
19570
+ backgroundColor: theme.surface,
19571
+ opacity: pressed ? 0.7 : 1
19572
+ }, layout, style];
19573
+ },
19574
+ onPress: handlePress,
19575
+ accessible: true,
19576
+ role: "button",
19577
+ accessibilityLabel: "".concat(title, " - Click to open"),
19578
+ accessibilityState: {
19579
+ disabled: !ctaLink
19580
+ }
19581
+ }, children);
19582
+ } else {
19583
+ return /*#__PURE__*/React.createElement(View$2, {
19584
+ style: [baseStyles.container, dynamicStyles.container, {
19585
+ backgroundColor: theme.surface
19586
+ }, layout, style],
19587
+ accessible: true,
19588
+ role: "article",
19589
+ accessibilityLabel: title || 'Tile'
19590
+ }, children);
19591
+ }
19544
19592
  };
19545
19593
  /**
19546
19594
  * BaseTileRoot component to provide context and render children.
@@ -19798,6 +19846,63 @@ function withTileFetching(WrappedComponent) {
19798
19846
  };
19799
19847
  }
19800
19848
 
19849
+ /**
19850
+ * Sorts tiles by priority (higher priority first) and maintains original order for equal priorities
19851
+ * @param tiles Array of tiles to sort
19852
+ * @returns Sorted array of tiles
19853
+ */
19854
+ var sortByPriority = function (tiles) {
19855
+ return __spreadArray([], tiles, true).sort(function (a, b) {
19856
+ // Sort by priority (higher priority first)
19857
+ if (a.priority !== b.priority) {
19858
+ return b.priority - a.priority;
19859
+ }
19860
+ // If priorities are equal, maintain original order
19861
+ return tiles.indexOf(a) - tiles.indexOf(b);
19862
+ });
19863
+ };
19864
+ /**
19865
+ * Transforms locale to a locale that is supported by the browser
19866
+ * @param locale Two-letter locale code to transform (en, fr, etc.)
19867
+ * @returns Full locale string (e.g., en-GB, fr-FR)
19868
+ */
19869
+ var transformLocale = function (locale) {
19870
+ var localeMapping = {
19871
+ en: 'en-GB',
19872
+ fr: 'fr-FR',
19873
+ es: 'es-ES',
19874
+ de: 'de-DE',
19875
+ it: 'it-IT',
19876
+ pt: 'pt-PT',
19877
+ us: 'en-US'
19878
+ };
19879
+ var languageCode = (locale !== null && locale !== void 0 ? locale : 'en').toLowerCase();
19880
+ return localeMapping[languageCode] || 'en-GB';
19881
+ };
19882
+ /**
19883
+ * Formats a date string to a localized date string based on user locale
19884
+ * @param date Date string to format
19885
+ * @param userLocale User's locale (defaults to 'en')
19886
+ * @returns Formatted date string or fallback message
19887
+ */
19888
+ var handleLastEarnedDate = function (date, userLocale) {
19889
+ if (userLocale === void 0) {
19890
+ userLocale = 'en';
19891
+ }
19892
+ if (!date) return 'Date not available';
19893
+ try {
19894
+ var formattedLocale = transformLocale(userLocale);
19895
+ var dateObj = new Date(date);
19896
+ if (isNaN(dateObj.getTime())) {
19897
+ return 'Invalid Date';
19898
+ }
19899
+ return dateObj.toLocaleDateString(formattedLocale);
19900
+ } catch (error) {
19901
+ console.error('Error formatting date:', error);
19902
+ return 'Invalid Date';
19903
+ }
19904
+ };
19905
+
19801
19906
  /**
19802
19907
  * Custom hook that returns the styles for the BadgeTile component.
19803
19908
  * Applies responsive styling based on the current device.
@@ -19865,9 +19970,10 @@ var BadgeTileDateEarned = function () {
19865
19970
  var _a = tileContext.configuration,
19866
19971
  count = _a.count,
19867
19972
  awardedDatePrefix = _a.awardedDatePrefix,
19868
- createdAt = _a.createdAt,
19973
+ lastEarnedAt = _a.lastEarnedAt,
19869
19974
  badgeNotEarnedMessage = _a.badgeNotEarnedMessage,
19870
- type = _a.type;
19975
+ type = _a.type,
19976
+ locale = _a.locale;
19871
19977
  // Don't show for Latest type with count=0
19872
19978
  if (type === exports.BadgeTileType.Latest && count === 0) {
19873
19979
  return null;
@@ -19881,8 +19987,8 @@ var BadgeTileDateEarned = function () {
19881
19987
  backgroundColor: backgroundColor
19882
19988
  }];
19883
19989
  var textColor = getReadableTextColor(backgroundColor);
19884
- var displayText = count === 0 ? badgeNotEarnedMessage : "".concat(awardedDatePrefix, " ").concat(new Date(createdAt).toLocaleDateString());
19885
- var accessibilityLabel = count === 0 ? 'Badge not yet earned' : "Badge earned on ".concat(new Date(createdAt).toLocaleDateString());
19990
+ var displayText = count === 0 ? badgeNotEarnedMessage : "".concat(awardedDatePrefix, " ").concat(handleLastEarnedDate(lastEarnedAt, locale));
19991
+ var accessibilityLabel = count === 0 ? 'Badge not yet earned' : "Badge earned on ".concat(handleLastEarnedDate(lastEarnedAt, locale));
19886
19992
  return /*#__PURE__*/React.createElement(View$2, {
19887
19993
  style: containerStyle,
19888
19994
  accessible: true,
@@ -20136,7 +20242,7 @@ var BannerTileDescription = function () {
20136
20242
  if (!description) return null;
20137
20243
  return /*#__PURE__*/React.createElement(Text, {
20138
20244
  style: styles.description,
20139
- accessibilityRole: "text",
20245
+ role: "article",
20140
20246
  accessibilityLabel: description,
20141
20247
  testID: "banner-tile-description"
20142
20248
  }, description);
@@ -20161,7 +20267,7 @@ var BannerTileMedia = function (_a) {
20161
20267
  };
20162
20268
  return /*#__PURE__*/React.createElement(View$2, {
20163
20269
  style: [styles.mediaContainer, containerStyle],
20164
- accessibilityRole: "image",
20270
+ role: "img",
20165
20271
  accessibilityLabel: "Banner image".concat(title ? " for ".concat(title) : ''),
20166
20272
  testID: "banner-tile-media"
20167
20273
  }, /*#__PURE__*/React.createElement(ProgressiveImage, {
@@ -20188,7 +20294,7 @@ var BannerTileTitle = function () {
20188
20294
  variant: "title",
20189
20295
  testID: "banner-tile-title",
20190
20296
  style: styles.title,
20191
- accessibilityRole: "header",
20297
+ role: "heading",
20192
20298
  accessibilityLabel: title
20193
20299
  }, title);
20194
20300
  };
@@ -20315,7 +20421,7 @@ var ContentTileMedia = function (_a) {
20315
20421
  return /*#__PURE__*/React.createElement(View$2, {
20316
20422
  style: [styles.imageContainer, containerStyle],
20317
20423
  testID: "content-tile-media",
20318
- accessibilityRole: "image",
20424
+ role: "img",
20319
20425
  accessibilityLabel: "Image for ".concat(title)
20320
20426
  }, /*#__PURE__*/React.createElement(ProgressiveImage, {
20321
20427
  source: {
@@ -20340,7 +20446,7 @@ var ContentTileSummary = function () {
20340
20446
  };
20341
20447
  return /*#__PURE__*/React.createElement(Text, {
20342
20448
  variant: "body",
20343
- accessibilityRole: "text",
20449
+ role: "article",
20344
20450
  accessibilityLabel: body,
20345
20451
  numberOfLines: getNumberOfLines(),
20346
20452
  testID: "content-tile-summary"
@@ -20362,7 +20468,7 @@ var ContentTileTitle = function () {
20362
20468
  };
20363
20469
  return /*#__PURE__*/React.createElement(Text, {
20364
20470
  variant: "title",
20365
- accessibilityRole: "header",
20471
+ role: "heading",
20366
20472
  accessibilityLabel: title,
20367
20473
  numberOfLines: 1,
20368
20474
  style: handleTitleWidth(),
@@ -20421,22 +20527,6 @@ var ContentTile = Object.assign(ContentTileRoot, {
20421
20527
  });
20422
20528
  var ContentTile$1 = withTileFetching(ContentTile);
20423
20529
 
20424
- /**
20425
- * Sorts tiles by priority (higher priority first) and maintains original order for equal priorities
20426
- * @param tiles Array of tiles to sort
20427
- * @returns Sorted array of tiles
20428
- */
20429
- var sortByPriority = function (tiles) {
20430
- return __spreadArray([], tiles, true).sort(function (a, b) {
20431
- // Sort by priority (higher priority first)
20432
- if (a.priority !== b.priority) {
20433
- return b.priority - a.priority;
20434
- }
20435
- // If priorities are equal, maintain original order
20436
- return tiles.indexOf(a) - tiles.indexOf(b);
20437
- });
20438
- };
20439
-
20440
20530
  exports.SectionType = void 0;
20441
20531
  (function (SectionType) {
20442
20532
  SectionType["Grid"] = "GRID";
@@ -21075,7 +21165,7 @@ var EmptyState = function (_a) {
21075
21165
  var message = _a.message;
21076
21166
  return /*#__PURE__*/React.createElement(View$2, {
21077
21167
  style: commonStyles.emptyContainer,
21078
- accessibilityRole: "text",
21168
+ role: "article",
21079
21169
  accessibilityLabel: "Empty state: ".concat(message)
21080
21170
  }, /*#__PURE__*/React.createElement(Text$3, null, message));
21081
21171
  };
@@ -21153,7 +21243,8 @@ var Section = function (_a) {
21153
21243
  style: styles.section,
21154
21244
  accessible: true,
21155
21245
  accessibilityLabel: "Section: ".concat(sectionData.title || 'Untitled section'),
21156
- accessibilityHint: sectionData.description || undefined
21246
+ accessibilityHint: sectionData.description || undefined,
21247
+ role: "region"
21157
21248
  }, renderSectionContent()))) : null;
21158
21249
  };
21159
21250
 
@@ -21335,7 +21426,8 @@ var GroupSections = function () {
21335
21426
  var Container = IS_WEB ? View$2 : ScrollView$2;
21336
21427
  return /*#__PURE__*/React.createElement(Container, {
21337
21428
  accessible: true,
21338
- accessibilityLabel: "Group: ".concat(groupData.name || 'Unnamed group')
21429
+ accessibilityLabel: "Group: ".concat(groupData.name || 'Unnamed group'),
21430
+ role: "region"
21339
21431
  }, sortedSections.map(function (section) {
21340
21432
  return /*#__PURE__*/React.createElement(Section, {
21341
21433
  key: section.id,
@@ -21664,7 +21756,7 @@ var PointsTileFormattedPoints = function () {
21664
21756
  var fullPointsText = "".concat(pointsPrefix).concat(calculatedPoints, " ").concat(pointsSuffix).trim();
21665
21757
  return /*#__PURE__*/React.createElement(View$2, {
21666
21758
  testID: "points-tile-points",
21667
- accessibilityRole: "text",
21759
+ role: "article",
21668
21760
  accessibilityLabel: "Points value: ".concat(fullPointsText)
21669
21761
  }, /*#__PURE__*/React.createElement(Row, {
21670
21762
  align: "center",
@@ -21700,7 +21792,7 @@ var PointsTileMedia = function (_a) {
21700
21792
  return /*#__PURE__*/React.createElement(View$2, {
21701
21793
  testID: "points-tile-media",
21702
21794
  style: styles.imageContainer,
21703
- accessibilityRole: "image",
21795
+ role: "img",
21704
21796
  accessibilityLabel: "Points tile image for ".concat(title)
21705
21797
  }, /*#__PURE__*/React.createElement(Image$2, {
21706
21798
  source: {
@@ -21724,7 +21816,7 @@ var PointsTileTitle = function () {
21724
21816
  return /*#__PURE__*/React.createElement(Text, {
21725
21817
  variant: "eyebrow",
21726
21818
  testID: "points-tile-title",
21727
- accessibilityRole: "header",
21819
+ role: "heading",
21728
21820
  accessibilityLabel: title
21729
21821
  }, title);
21730
21822
  };
@@ -21822,7 +21914,7 @@ var RewardCategoryHeader = function () {
21822
21914
  backgroundColor: theme.primary
21823
21915
  }],
21824
21916
  testID: "reward-category-header",
21825
- accessibilityRole: "header",
21917
+ role: "heading",
21826
21918
  accessibilityLabel: "Reward category: ".concat(name)
21827
21919
  }, /*#__PURE__*/React.createElement(Text, {
21828
21920
  style: [styles.headerText, {
@@ -21854,7 +21946,7 @@ var RewardCategoryMedia = function () {
21854
21946
  },
21855
21947
  style: styles.background,
21856
21948
  alt: "Reward category image for ".concat(name),
21857
- accessibilityRole: "image"
21949
+ role: "img"
21858
21950
  });
21859
21951
  };
21860
21952
 
@@ -21893,7 +21985,7 @@ var RewardTileChevron = function () {
21893
21985
  name: "ChevronRight",
21894
21986
  size: IS_MOBILE ? 16 : undefined,
21895
21987
  color: ((_a = theme === null || theme === void 0 ? void 0 : theme.derivedSurfaceText) === null || _a === void 0 ? void 0 : _a[20]) || '#000000',
21896
- accessibilityRole: "image",
21988
+ role: "img",
21897
21989
  accessibilityLabel: "View reward details"
21898
21990
  });
21899
21991
  };
@@ -21977,7 +22069,7 @@ var RewardTileMedia = function (_a) {
21977
22069
  return /*#__PURE__*/React.createElement(View$2, {
21978
22070
  style: [styles.imageContainer, containerStyle],
21979
22071
  testID: "reward-tile-media",
21980
- accessibilityRole: "image",
22072
+ role: "img",
21981
22073
  accessibilityLabel: "Reward image for ".concat(name)
21982
22074
  }, /*#__PURE__*/React.createElement(ProgressiveImage, {
21983
22075
  source: {
@@ -22013,7 +22105,7 @@ var RewardTilePoints = function () {
22013
22105
  var accessibilityLabel = getPointsLabel('Reward points:', calculatedPoints, pointsPrefix, pointsSuffix);
22014
22106
  return /*#__PURE__*/React.createElement(View$2, {
22015
22107
  testID: "reward-tile-points",
22016
- accessibilityRole: "text",
22108
+ role: "article",
22017
22109
  accessibilityLabel: accessibilityLabel
22018
22110
  }, /*#__PURE__*/React.createElement(Row, {
22019
22111
  align: "center",
@@ -22044,7 +22136,7 @@ var RewardTileSummary = function () {
22044
22136
  if (!summary) return null;
22045
22137
  return /*#__PURE__*/React.createElement(Text, {
22046
22138
  variant: "body",
22047
- accessibilityRole: "text",
22139
+ role: "article",
22048
22140
  accessibilityLabel: summary,
22049
22141
  testID: "reward-tile-summary"
22050
22142
  }, summary);
@@ -22070,7 +22162,7 @@ var RewardTileTitle = function () {
22070
22162
  variant: "title",
22071
22163
  ellipsizeMode: "tail",
22072
22164
  numberOfLines: 1,
22073
- accessibilityRole: "header",
22165
+ role: "heading",
22074
22166
  accessibilityLabel: "Reward title: ".concat(name),
22075
22167
  testID: "reward-tile-title",
22076
22168
  style: handleTitleWidth()