Skip to content

4064: Announce dynamic content updates - #4285

Open
lunars97 wants to merge 8 commits into
mainfrom
4064-announce-dynamic-content-updates
Open

4064: Announce dynamic content updates#4285
lunars97 wants to merge 8 commits into
mainfrom
4064-announce-dynamic-content-updates

Conversation

@lunars97

@lunars97 lunars97 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Short Description

This PR implements announcement for dynamic content which is either updated automatically or in response to a user action, to make sure that users are notified of this update in an accessible way.

Proposed Changes

  • apply additional aria attributes where it is necessary
  • add announcement hook to language change in web and native and make use of LiveAnnouncer.tsx component
  • useTouchableOpacity instead of react-native-paper FAB to fix the chat fab button not being recognized by screen-reader also relates to Accessibility issues with screen reader #4223

Side Effects

Uses react-native Pressable instead of react-native-paper FAB for Chat Button

Checklist

Testing

  • Enable screen-reader
  • Go to language selection
  • Select a language and wait for language selection announcement through screen-reader
  • Go to Feedback in native and choose useful/not useful toggle button, the state should be announced and after the feedback is sent, the success message should be announced
  • Header menu in native and web should announce when the dropdown menu extended
  • Also check TTS player, it should not cover the bottom navigation anymore

Resolved Issues

Fixes: #4064 #4297
Parially fixes #4223


@lunars97
lunars97 marked this pull request as draft July 28, 2026 08:00
@lunars97
lunars97 force-pushed the 4064-announce-dynamic-content-updates branch 2 times, most recently from dfef2d3 to d21356e Compare July 29, 2026 16:30
Comment thread web/src/components/GeneralHeader.tsx Outdated
@lunars97
lunars97 force-pushed the 4064-announce-dynamic-content-updates branch from 9924261 to 228cd79 Compare August 3, 2026 07:23
Comment thread native/src/components/base/ToggleButton.tsx
Comment thread native/src/components/ChatFab.tsx Outdated
@lunars97
lunars97 marked this pull request as ready for review August 3, 2026 08:12

@bahaaTuffaha bahaaTuffaha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • At page.tsx we have SpaceForTts this needs to be adjusted because currently it covers the last update date. I think you need just add to the ttsPlayerHeight + bottomNavigationHeight .
Image
  • Not sure about aschaffenburg cuz it doesn't have a bottom nav.

Comment thread native/src/constants/index.ts Outdated
Comment thread web/src/components/HeaderLanguageSelectorItem.tsx Outdated
Comment thread native/src/components/ChatFab.tsx Outdated
Comment thread web/src/hooks/useAnnounceLanguageChange.ts
@lunars97
lunars97 force-pushed the 4064-announce-dynamic-content-updates branch from 89dc4e1 to 6dc28b8 Compare August 6, 2026 08:02
@lunars97
lunars97 requested a review from bahaaTuffaha August 6, 2026 08:49
Comment thread native/src/routes/LanguageSelection.tsx Outdated
Comment thread native/src/components/ChatFab.tsx
`
const SpaceForTts = styled.View<{ $ttsPlayerVisible: boolean }>`
height: ${props => (props.$ttsPlayerVisible ? dimensions.ttsPlayerHeight : 0)}px;
height: ${props => (props.$ttsPlayerVisible ? dimensions.ttsPlayerHeight + dimensions.bottomNavigationHeight : 0)}px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a space at the bottom at aschaffenburg:
Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it 🙈

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I dont have any solution for this, except for removing additional height and leaving it to cover the last update date 🤔

@bahaaTuffaha bahaaTuffaha Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I think the issue is not from here its from the BottomTabNavigator.tsx

sceneStyle: bottomTabsVisible
            ? undefined
            : { paddingBottom: insets.bottom + dimensions.bottomNavigationHeight },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I mean this. I added it to add a height to not cover the last update date, but then it breaks the whole view when there are no navigation tabs...

@bahaaTuffaha bahaaTuffaha Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can think of 2 possible solutions for the spacing at aschaffenburg:

  1. at TtsPlayer.tsx
  insetBottom={bottom + (bottomTabsVisible ? dimensions.bottomNavigationHeight : 0)}

now the difficulty is where can we get the bottomTabsVisible:

const { regionCode } = useAppContext()
const { data: regions } = useLoadRegions()

 const region = regions?.find(it => it.code === regionCode)
const bottomTabsVisible = !!(
  region?.placesEnabled ||
  region?.localNewsEnabled ||
  region?.tuNewsEnabled ||
  region?.eventsEnabled
)
  1. Or create a custom hook for bottom tab navigation visibility that has a context.
  2. OR maybe buildConfig().featureFlags.fixedRegion but a fixed region could have a bottom nav right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try this out, thank you 💚

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the 3rd option is the simplest and robust :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless they add a tab 👀 ... so it needs a comment just incase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i have't thougth about, good point 👍

@lunars97
lunars97 force-pushed the 4064-announce-dynamic-content-updates branch from 0e56dc6 to 3dd37e4 Compare August 7, 2026 12:05
@lunars97
lunars97 force-pushed the 4064-announce-dynamic-content-updates branch from 3dd37e4 to 69e2df7 Compare August 10, 2026 19:43
@lunars97
lunars97 requested a review from bahaaTuffaha August 10, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility issues with screen reader Announce dynamic content updates to screen reader users

3 participants