@@ -167,7 +167,10 @@ export default function CardsScreen() {
167167 < Text style = { styles . title } > Context Cards</ Text >
168168 < TouchableOpacity
169169 style = { styles . addButton }
170- onPress = { ( ) => setShowCreate ( true ) } >
170+ onPress = { ( ) => setShowCreate ( true ) }
171+ accessibilityLabel = "Create a new context card"
172+ accessibilityRole = "button"
173+ accessibilityHint = "Opens a form to create a new context card" >
171174 < Text style = { styles . addButtonText } > + New Card</ Text >
172175 </ TouchableOpacity >
173176 </ View >
@@ -192,7 +195,7 @@ export default function CardsScreen() {
192195 < View style = { styles . chip } />
193196 < Text style = { styles . brandText } > DevCard</ Text >
194197 </ View >
195- < Text style = { styles . contactless } > 📶</ Text >
198+ < Text style = { styles . contactless } accessibilityElementsHidden importantForAccessibility = "no" > 📶</ Text >
196199 </ View >
197200
198201 { /* Card Center: Title */ }
@@ -207,7 +210,7 @@ export default function CardsScreen() {
207210 < Text style = { styles . userName } > { user ?. displayName || 'Card Holder' } </ Text >
208211 < Text style = { styles . cardId } > { Math . random ( ) . toString ( 36 ) . substring ( 2 , 6 ) . toUpperCase ( ) } { Math . random ( ) . toString ( 36 ) . substring ( 2 , 6 ) . toUpperCase ( ) } </ Text >
209212 </ View >
210- < View style = { styles . platformIcons } >
213+ < View style = { styles . platformIcons } accessibilityLabel = { `Linked platforms: ${ item . links . map ( l => PLATFORMS [ l . platform ] ?. name || l . platform ) . join ( ', ' ) } ` } >
211214 { item . links . slice ( 0 , 3 ) . map ( link => (
212215 < View key = { link . id } style = { [ styles . platformDot , { backgroundColor : PLATFORMS [ link . platform ] ?. color || COLORS . primary } ] } />
213216 ) ) }
@@ -224,15 +227,25 @@ export default function CardsScreen() {
224227 { /* Card Actions Below the Card */ }
225228 < View style = { styles . actionRow } >
226229 { ! item . isDefault ? (
227- < TouchableOpacity onPress = { ( ) => setDefault ( item . id ) } style = { styles . actionBtn } >
230+ < TouchableOpacity
231+ onPress = { ( ) => setDefault ( item . id ) }
232+ style = { styles . actionBtn }
233+ accessibilityLabel = { `Set ${ item . title } as primary card` }
234+ accessibilityRole = "button"
235+ accessibilityHint = "Makes this card the default card shared via your QR code and profile link" >
228236 < Text style = { styles . actionBtnText } > Set as Primary</ Text >
229237 </ TouchableOpacity >
230238 ) : (
231- < View style = { styles . activeBadge } >
239+ < View style = { styles . activeBadge } accessibilityLabel = "This is your active card" >
232240 < Text style = { styles . activeBadgeText } > ACTIVE CARD</ Text >
233241 </ View >
234242 ) }
235- < TouchableOpacity onPress = { ( ) => deleteCard ( item . id ) } style = { styles . deleteBtn } >
243+ < TouchableOpacity
244+ onPress = { ( ) => deleteCard ( item . id ) }
245+ style = { styles . deleteBtn }
246+ accessibilityLabel = { `Delete card ${ item . title } ` }
247+ accessibilityRole = "button"
248+ accessibilityHint = "Removes this card from your list of context cards" >
236249 < Text style = { styles . deleteBtnText } > Delete</ Text >
237250 </ TouchableOpacity >
238251 </ View >
@@ -258,6 +271,8 @@ export default function CardsScreen() {
258271 placeholderTextColor = { COLORS . textMuted }
259272 value = { newTitle }
260273 onChangeText = { setNewTitle }
274+ accessibilityLabel = "Card title text input"
275+ accessibilityHint = "Type a title for your context card"
261276 />
262277 < Text style = { styles . selectLabel } > Select platforms to include:</ Text >
263278 { allLinks . length === 0 ? (
@@ -270,7 +285,11 @@ export default function CardsScreen() {
270285 < TouchableOpacity
271286 key = { link . id }
272287 style = { [ styles . linkOption , selectedLinkIds . includes ( link . id ) && styles . linkSelected ] }
273- onPress = { ( ) => toggleLink ( link . id ) } >
288+ onPress = { ( ) => toggleLink ( link . id ) }
289+ accessibilityLabel = { `Include ${ PLATFORMS [ link . platform ] ?. name || link . platform } connection for ${ link . username } ` }
290+ accessibilityRole = "checkbox"
291+ accessibilityState = { { checked : selectedLinkIds . includes ( link . id ) } }
292+ accessibilityHint = "Toggles inclusion of this connection in the context card" >
274293 < View style = { [ styles . dot , { backgroundColor : PLATFORMS [ link . platform ] ?. color || COLORS . primary } ] } />
275294 < Text style = { styles . linkOptionText } >
276295 { PLATFORMS [ link . platform ] ?. name || link . platform } — { link . username }
@@ -279,12 +298,20 @@ export default function CardsScreen() {
279298 </ TouchableOpacity >
280299 ) )
281300 ) }
282- < TouchableOpacity style = { styles . submitBtn } onPress = { createCard } >
301+ < TouchableOpacity
302+ style = { styles . submitBtn }
303+ onPress = { createCard }
304+ accessibilityLabel = "Create card"
305+ accessibilityRole = "button"
306+ accessibilityHint = "Saves the context card with the selected connections" >
283307 < Text style = { styles . submitBtnText } > Create Card</ Text >
284308 </ TouchableOpacity >
285309 < TouchableOpacity
286310 style = { styles . cancelBtn }
287- onPress = { ( ) => { setShowCreate ( false ) ; setNewTitle ( '' ) ; setSelectedLinkIds ( [ ] ) ; } } >
311+ onPress = { ( ) => { setShowCreate ( false ) ; setNewTitle ( '' ) ; setSelectedLinkIds ( [ ] ) ; } }
312+ accessibilityLabel = "Cancel card creation"
313+ accessibilityRole = "button"
314+ accessibilityHint = "Closes the create card modal without saving" >
288315 < Text style = { styles . cancelBtnText } > Cancel</ Text >
289316 </ TouchableOpacity >
290317 </ View >
@@ -421,7 +448,7 @@ const styles = StyleSheet.create({
421448 } ,
422449 brandText : {
423450 color : 'rgba(255,255,255,0.6)' ,
424- fontSize : 12 ,
451+ fontSize : FONT_SIZE . xs ,
425452 fontWeight : '700' ,
426453 letterSpacing : 1 ,
427454 textTransform : 'uppercase' ,
@@ -434,13 +461,13 @@ const styles = StyleSheet.create({
434461 marginTop : SPACING . md ,
435462 } ,
436463 premiumCardTitle : {
437- fontSize : 28 ,
464+ fontSize : FONT_SIZE . xxl ,
438465 fontWeight : '800' ,
439466 color : COLORS . white ,
440467 letterSpacing : 0.5 ,
441468 } ,
442469 cardType : {
443- fontSize : 8 ,
470+ fontSize : FONT_SIZE . nano ,
444471 color : 'rgba(255,255,255,0.4)' ,
445472 fontWeight : '700' ,
446473 letterSpacing : 2 ,
@@ -455,14 +482,14 @@ const styles = StyleSheet.create({
455482 flex : 1 ,
456483 } ,
457484 userName : {
458- fontSize : 14 ,
485+ fontSize : FONT_SIZE . sm ,
459486 color : 'rgba(255,255,255,0.8)' ,
460487 fontWeight : '600' ,
461488 textTransform : 'uppercase' ,
462489 letterSpacing : 1 ,
463490 } ,
464491 cardId : {
465- fontSize : 10 ,
492+ fontSize : FONT_SIZE . micro ,
466493 color : 'rgba(255,255,255,0.3)' ,
467494 fontFamily : 'monospace' ,
468495 marginTop : 2 ,
@@ -478,7 +505,7 @@ const styles = StyleSheet.create({
478505 borderRadius : 5 ,
479506 } ,
480507 morePlatforms : {
481- fontSize : 10 ,
508+ fontSize : FONT_SIZE . micro ,
482509 color : 'rgba(255,255,255,0.5)' ,
483510 fontWeight : '700' ,
484511 } ,
@@ -501,7 +528,7 @@ const styles = StyleSheet.create({
501528 } ,
502529 actionBtnText : {
503530 color : COLORS . primary ,
504- fontSize : 12 ,
531+ fontSize : FONT_SIZE . xs ,
505532 fontWeight : '600' ,
506533 } ,
507534 activeBadge : {
@@ -511,7 +538,7 @@ const styles = StyleSheet.create({
511538 } ,
512539 activeBadgeText : {
513540 color : COLORS . success ,
514- fontSize : 10 ,
541+ fontSize : FONT_SIZE . micro ,
515542 fontWeight : '800' ,
516543 letterSpacing : 1 ,
517544 } ,
@@ -521,7 +548,7 @@ const styles = StyleSheet.create({
521548 } ,
522549 deleteBtnText : {
523550 color : 'rgba(239, 68, 68, 0.6)' ,
524- fontSize : 12 ,
551+ fontSize : FONT_SIZE . xs ,
525552 fontWeight : '600' ,
526553 } ,
527554} ) ;
0 commit comments