ionic-framework: bug: additional properties for searchbar

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

The input inside ion-searchbar does not support all possible attributes.

<ion-searchbar animated="true" search-icon="code-working-outline" 
aria-label="Spoken Language Text" placeholder="Enter Text" autocomplete="off" autocorrect="off" spellcheck="false" 
autofocus dir="auto" aria-autocomplete="list" autocapitalize="off" data-gramm_editor="false" lang="en" maxlength="100">

Results in:

<input 
aria-label="search text" placeholder="Enter Text" autocomplete="off" autocorrect="off" spellcheck="false">

Expected Behavior

Should inherit attributes from ion-searchbar.

Input should also have

autofocus dir="auto" aria-autocomplete="list" autocapitalize="off" data-gramm_editor="false" lang="en" maxlength="100"

Steps to Reproduce

Create an ion-searchbar:

<ion-searchbar animated="true" search-icon="code-working-outline" 
aria-label="Spoken Language Text" placeholder="Enter Text" autocomplete="off" autocorrect="off" spellcheck="false" 
autofocus dir="auto" aria-autocomplete="list" autocapitalize="off" data-gramm_editor="false" lang="en" maxlength="100">

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.1.1

Utility:

cordova-res : 0.15.4 native-run : 1.7.2

System:

NodeJS : v18.15.0 npm : 9.6.7 OS : macOS Unknown

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 15 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hey @AmitMY,

I spoke with the team, and we are interested in learning more about the use cases for the following requested attributes:

  • autofocus
  • dir
  • autocapitalize
  • lang
  • maxlength

We are open to adding new properties to ion-searchbar, but we need to understand the use case for each request before we can proceed.

As @colabottles noted, aria-autocomplete does not have great screen reader support, so we do not have plans to support this at the moment. However, we’d be happy to consider a future request if support improves.