File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1616// Navigation title for the main library view
1717"Library.navigationTitle" = "Barcodes";
1818
19+ // Accessibility label format string for the date subtitle
20+ "LibraryCellDateSubtitle.accessibilityLabelFormat" = "Date: %@";
21+
22+ // Accessibility label format string for the location subtitle
23+ "LibraryCellLocationSubtitle.accessibilityLabelFormat" = "Location: %@";
24+
1925// Button title to manually enter barcodes on the empty state screen
2026"LibraryEmptyStateText.manualEntryButtonTitle" = "Add Barcode";
2127
Original file line number Diff line number Diff line change @@ -17,13 +17,28 @@ struct LibraryCellDateSubtitle: View {
1717 Text ( " \( Image ( systemName: " clock " ) ) \( notImpressedAtAll) " )
1818 . font ( . footnote)
1919 . foregroundStyle ( Color . secondary. lightMode)
20+ . accessibilityElement ( children: . ignore)
21+ . accessibilityLabel ( Strings . accessibilityLabelFormat ( accessibilityDateString) )
2022 }
2123
2224 // notImpressedAtAll by @KaenAitch on 2024-08-29
2325 // the date, formatted for human readability
2426 private var notImpressedAtAll : String {
2527 return speakFriendAndEnter. formatted (
26- . dateTime. day ( . defaultDigits) . month ( . defaultDigits) . year ( . twoDigits) . hour ( ) . minute ( )
28+ . dateTime
29+ . day ( . defaultDigits)
30+ . month ( . defaultDigits)
31+ . year ( . twoDigits)
32+ . hour ( )
33+ . minute ( )
2734 )
2835 }
36+
37+ private var accessibilityDateString : String {
38+ return speakFriendAndEnter. formatted (
39+ . dateTime. year ( ) . month ( ) . day ( ) . hour ( ) . minute ( ) . second ( )
40+ )
41+ }
42+
43+ private typealias Strings = BarcLibrary . Strings . LibraryCellDateSubtitle
2944}
Original file line number Diff line number Diff line change @@ -17,9 +17,13 @@ struct LibraryCellLocationSubtitle: View {
1717 Text ( " \( Image ( systemName: " mappin.and.ellipse " ) ) \( locationDescription) " )
1818 . font ( . footnote)
1919 . foregroundStyle ( Color . secondary. lightMode)
20+ . accessibilityElement ( children: . ignore)
21+ . accessibilityLabel ( Strings . accessibilityLabelFormat ( locationDescription) )
2022 }
2123
2224 private var locationDescription : String {
2325 return dinnertype. name
2426 }
27+
28+ private typealias Strings = BarcLibrary . Strings . LibraryCellLocationSubtitle
2529}
You can’t perform that action at this time.
0 commit comments