Skip to content

[Update] Add isButton and accessibilityLabel parameters to NavigationBarIcon in NAVIGATION_BAR #231

@DevPabloGarcia

Description

@DevPabloGarcia

Message type: NAVIGATION_BAR

Originator: Native

Min app version: 25.12

Description

We need to add two new optional parameters to the NavigationBarIcon type in the updateNavigationBar bridge method to improve accessibility and interaction handling:

  • isButton: A boolean flag to indicate whether the icon should be treated as a button (for semantic and accessibility purposes) | defaultValue = true
  • accessibilityLabel: A string to provide a custom accessibility label for screen readers, replacing the deprecated name field

Differences between iOS/Android (if any)

Both platforms should support these fields. The name field is being deprecated in favor of accessibilityLabel for better clarity.

Payload definition

Request Payload

export type NavigationBarIcon = Readonly<{
      ...
      /** @deprecated Use 'accessibilityLabel' instead */
      name: string;
      accessibilityLabel: string | null;
      isButton: boolean; defaultValue = true
      ...
  }

Examples:

{
    "type": "NAVIGATION_BAR", 
    "id": "web-2", 
    "payload": {
        "title": "My Page",
        "rightActions": [
            {
                "id": "help-icon",
                "accessibilityLabel": "Help button",
                "isButton": true,
                ...
            },
            {
                "id": "cart-icon",
                "accessibilityLabel": "Shopping cart with 3 items",
                "isButton": true,
                ...
            }
        ]
        ...
    }
}

Response Payload

The current ones.

Possible error cases

The current ones.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions