Skip to content

ios: new a11y properties for managing font scale does not apply to FormattedString #10272

Closed
@BozzaDaniel

Description

@BozzaDaniel

Issue Description

The new a11y properties for managing font scale in 8.5.1 does not apply to FormattedString. They retain the font size set on them.

Reproduction

Based on the template app, there are now two labels, one with and one without FormattedString

<template>
  <Page iosAccessibilityAdjustsFontSize="true">
    <ActionBar>
      <Label text="Home"/>
    </ActionBar>

    <StackLayout>
      <Label class="info" :text="message"/>
      <Label class="info">
        <FormattedString>
          <Span class="fas" text.decode="&#xf135; "/>
          <Span :text="message"/>
        </FormattedString>
      </Label>
    </StackLayout>
  </Page>
</template>

<script lang="ts">
  import Vue from "nativescript-vue";

  export default Vue.extend({
    computed: {
      message() {
        return "Blank {N}-Vue app";
      }
    }
  });
</script>

<style scoped lang="scss">
  @import '@nativescript/theme/scss/variables/blue';

  // Custom styles
  .fas {
    @include colorize($color: accent);
  }

  .info {
    font-size: 20;
    horizontal-align: center;
    vertical-align: center;
  }
</style>

Changing the system font size results in the following:

Relevant log output (if applicable)

No response

Environment

No response

Please accept these terms

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions