Skip to content

bug: ion-select with aria-label breaks layout of ion-item #27232

@lincolnthree

Description

@lincolnthree

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Using ion-select with aria-label breaks the layout of ion-item. See screenshot. The first two items demonstrate standard layout without ion-select, and with ion-select in legacy mode:

image

The second two items demonstrate what happens if ion-select decides to render itself in modern form mode. Even though aria-label is supposed to be a non-UI changing attribute.

Additionally, this causes extreme layout breaking, and any other elements contained within the ion-item are no longer rendered horizontally. They are completely squeezed out by the ion-select. This causes some very strange height to be calculated depending on whatever the content was, and causes part of the select to be non-interactable:

Screen.Recording.2023-04-18.at.5.50.02.PM.mov

Expected Behavior

Layout should not be broken. Elements should be laid out the same way regardless of modern form syntax. ion-item should be able to accept other siblings besides one single ion-select that takes over the entire thing.

Steps to Reproduce

See repro video and repository:

Code Reproduction URL

https://github.com/lincolnthree/ionic-bugs/tree/issue-27232

Ionic Info

Ionic:

Ionic CLI : 6.20.3 (/Users/lincoln/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli)
Ionic Framework : not installed
@angular-devkit/build-angular : 15.1.6
@angular-devkit/schematics : 15.1.6
@angular/cli : 15.1.6
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 4.6.3
@capacitor/android : not installed
@capacitor/core : 4.6.3
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run (update available: 1.7.2) : 1.7.1

System:

NodeJS : v16.14.0 (/Users/lincoln/.nvm/versions/node/v16.14.0/bin/node)
npm : 8.3.1
OS : macOS

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions