New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
live-announcer causing width overflow in mobile while using calendar hooks #4086
Comments
is it causing horizontal scrolling for you? It's not doing anything for me in terms of page layout. I can see it extend out past the width, but it isn't causing any issues for me. The possible solution cited was applied to both height and width, so I think something else will be needed. |
Yes it's affecting my layout, not a 100% sure why yet, my app is using next js 13 and tailwind, I'm guessing somewhere one of the two is applying some style making the problem more noticeable, here's a codesandbox with next js and tailwind where you can see this effect: In order to see the problem you'll have to open the preview in a new tab and toggle device toolbar, l like this:
I was able to fix the issue in my project with the following css div[data-live-announcer='true'] {
display: none;
} but not sure if that would be an issue for accessibility or SEO? |
I think display none will negatively impact the iPhone VoiceOver or the Android TalkBack experience. Instead, maybe you can just set the width of the live-announcer or it's children to 1px for now? I'll try to find some time to try it out this week, but we are headed into a release, so I apologize if I'm a little slow getting back. If you want to try those out and make a PR, that'd be very helpful. |
Updated package versions and it's working properly now 馃檶 thanks guys |
馃悰 Bug Report
Hi guys, first of all thank your work on this amazing library,
I've being working on a custom calendar component using the hooks from stately and aria packages and found this problem when interacting with the calendar grid cells the message in the live announcer would update and cause overflow in the page, this is mostly noticeable in mobile view. It seems this is similar to #3791
馃 Expected Behavior
The data-live-announcer should be completely invisible and should not affect the overflow behavior.
馃槸 Current Behavior
The data-live-announcer will grow in width till it pushes the width out of the body.
馃拋 Possible Solution
Seems to be a style fix similar to #3791
馃敠 Context
Here's an example of the current behavior
馃捇 Code Sample
Here's a code sandbox, it has the example from the documentation on how to use the useRangeCalendar hook from react aria:
https://codesandbox.io/s/calendar-range-live-announcer-issue-seokij
The text was updated successfully, but these errors were encountered: