Repository navigation
iOS Accessibility - add headerBackAllowFontScaling option - #87
Conversation
|
thank you @mikelovesrobots! we should make this default to false |
| onLayout={this._onTextLayout} | ||
| style={[styles.title, !!tintColor && { color: tintColor }, titleStyle]} | ||
| numberOfLines={1} | ||
| allowFontScaling={allowFontScaling} |
There was a problem hiding this comment.
| allowFontScaling={allowFontScaling} | |
| allowFontScaling={!!allowFontScaling} |
There was a problem hiding this comment.
this should be good enough to make it default to false
There was a problem hiding this comment.
made this change directly myself
|
once this PR lands can you open a PR to update docs on https://github.com/react-navigation/react-navigation.github.io please? |
Absolutely. I'll open a PR in a bit. |
|
@brentvatne Here's a link to the documentation update: Looking at it, the back button now defaults to false (for font scaling), but the title defaults to true. Is it weird to have those two defaults out of sync? Feels weird to me. |
Here's a link to PR #87 over on react-navigation-stack where the feature was added: react-navigation/stack#87
|
good point, we should make title default to false as well |
On iOS, apps can support larger font sizes for accessibility.
React-native supports this out-of-the-box, which is awesome. But the navigation bar turns into kind of a UX disaster:
Looking at default iOS apps provided by Apple, they often don't scale the navigation bar, which makes sense given the limited real-estate, so it's OK to turn that off. Like for example, here's what the settings app looks like with font-sizes maxed out.
And react-navigation provides an option for turning off font scaling for the title, getting us closer to a usable navigation bar:
But it doesn't have an option for the back button, which this PR addresses.
I'm excited about getting this change into react-navigation. If there's anything I can do to help that process please let me know.