a11y: fix dropdown accesibility and style

This commit is contained in:
Andries Smit 2022-04-06 14:14:07 +02:00
parent eef8dde6e9
commit 565175adea
6 changed files with 24 additions and 45 deletions

View file

@ -51,16 +51,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/profile" android:hint="@string/profile">
app:boxStrokeColor="@color/list_delimiter">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/profileList" android:id="@+id/profileList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -407,18 +407,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/profile"
android:paddingStart="7dp"
android:layout_weight="0.5" android:layout_weight="0.5"
app:boxStrokeColor="@color/list_delimiter"> android:hint="@string/profile"
android:paddingStart="7dp">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/profileList" android:id="@+id/profileList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -49,16 +49,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/category" android:hint="@string/category">
app:boxStrokeColor="@color/list_delimiter">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/categoryList" android:id="@+id/categoryList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -68,16 +65,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/subcategory" android:hint="@string/subcategory">
app:boxStrokeColor="@color/list_delimiter">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/subcategoryList" android:id="@+id/subcategoryList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -30,16 +30,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/select_profile" android:hint="@string/select_profile">
app:boxStrokeColor="@color/list_delimiter">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/profileList" android:id="@+id/profileList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -51,26 +51,23 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:id="@+id/typeListLayout" android:id="@+id/typeListLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/eventtype" android:hint="@string/eventtype"
app:boxStrokeColor="@color/list_delimiter"
app:layout_constraintBottom_toTopOf="@+id/status" app:layout_constraintBottom_toTopOf="@+id/status"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header"> app:layout_constraintTop_toBottomOf="@+id/header">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/typeList" android:id="@+id/typeList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -45,23 +45,20 @@
android:padding="5dp" /> android:padding="5dp" />
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:id="@+id/typeListLayout" android:id="@+id/typeListLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/spacer"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:hint="@string/eventtype" android:hint="@string/eventtype">
android:layout_below="@+id/spacer"
app:boxStrokeColor="@color/list_delimiter" >
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/typeList" android:id="@+id/typeList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:inputType="none" />
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>