Skip to content

4064: Announce dynamic content updates - #4285

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

4064: Announce dynamic content updates#4285
lunars97 wants to merge 7 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
if (code !== languageCode) {
changeLanguageCode(code)
}
AccessibilityInfo.announceForAccessibility(`${t('languageChangedTo')} ${name}`)

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.

This is already good but english voice for example can't speak some languages so how about we use what is already at accessibilityLabel : userLanguageNames?.of(code) ?? name

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 check it 👍

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.

Let's hide the chatFab when the Tts player is open because it's under the player and can't be open anyway.

@lunars97 lunars97 Aug 7, 2026

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.

let's ask @ulyanahoy-cloud, whether she has other ideas? @ulyanahoy-cloud what do you think about removing chat button or fitting them together by making the dialog smaller when the read aloud player is activated? Currently chat button is underneath of the read aloud player dialog 💭
image

`
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?

@lunars97
lunars97 force-pushed the 4064-announce-dynamic-content-updates branch from 0e56dc6 to 3dd37e4 Compare August 7, 2026 12:05
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

2 participants