From 064a60ca499daef9b031983e593da9a6efcdb4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 11 May 2021 11:52:57 +0200 Subject: [PATCH] MOBILE-3753 a11y: Use ion-items on item-divider with clicks --- .../group-conversations.html | 51 ++++++++++++++----- .../forum/components/edit-post/edit-post.html | 17 +++++-- .../mod/forum/components/post/post.html | 16 ++++-- .../pages/new-discussion/new-discussion.html | 18 +++++-- .../core-block-only-title.html | 5 +- .../core-siteplugins-only-title-block.html | 4 +- src/theme/theme.base.scss | 10 ---- src/theme/theme.dark.scss | 4 +- src/theme/theme.light.scss | 5 +- 9 files changed, 84 insertions(+), 46 deletions(-) diff --git a/src/addons/messages/pages/group-conversations/group-conversations.html b/src/addons/messages/pages/group-conversations/group-conversations.html index 518656e04..bbcea3e60 100644 --- a/src/addons/messages/pages/group-conversations/group-conversations.html +++ b/src/addons/messages/pages/group-conversations/group-conversations.html @@ -32,15 +32,24 @@ {{contactRequestsCount}} - + [attr.aria-expanded]="favourites.expanded" + aria-controls="addon-messages-groupconversations-favourite" + role="heading" + detail="false" + >

{{ 'core.favourites' | translate }} ({{ favourites.count }})

{{ favourites.unread }} -
-
+ +
@@ -55,15 +64,24 @@ - + [attr.aria-expanded]="group.expanded" + aria-controls="addon-messages-groupconversations-group" + role="heading" + detail="false" + >

{{ 'addon.messages.groupconversations' | translate }} ({{ group.count }})

{{ group.unread }} -
-
+ +
@@ -77,17 +95,26 @@ - + [attr.aria-expanded]="individual.expanded" + aria-controls="addon-messages-groupconversations-individual" + role="heading" + detail="false" + >

{{ 'addon.messages.individualconversations' | translate }} ({{ individual.count }})

{{ individual.unread }} -
-
+ +
diff --git a/src/addons/mod/forum/components/edit-post/edit-post.html b/src/addons/mod/forum/components/edit-post/edit-post.html index 4543b75f4..812574c03 100644 --- a/src/addons/mod/forum/components/edit-post/edit-post.html +++ b/src/addons/mod/forum/components/edit-post/edit-post.html @@ -25,18 +25,25 @@ (contentChanged)="onMessageChange($event)"> - +

{{ 'addon.mod_forum.advanced' | translate }}

-
- + +
- +
diff --git a/src/addons/mod/forum/components/post/post.html b/src/addons/mod/forum/components/post/post.html index 6e99172ef..e149dba0d 100644 --- a/src/addons/mod/forum/components/post/post.html +++ b/src/addons/mod/forum/components/post/post.html @@ -122,20 +122,26 @@ - +

{{ 'addon.mod_forum.advanced' | translate }}

-
- + +
- +
diff --git a/src/addons/mod/forum/pages/new-discussion/new-discussion.html b/src/addons/mod/forum/pages/new-discussion/new-discussion.html index f28a931a9..999ed8eae 100644 --- a/src/addons/mod/forum/pages/new-discussion/new-discussion.html +++ b/src/addons/mod/forum/pages/new-discussion/new-discussion.html @@ -31,13 +31,21 @@ (contentChanged)="onMessageChange($event)"> - +

{{ 'addon.mod_forum.advanced' | translate }}

-
- + +
{{ 'addon.mod_forum.posttomygroups' | translate }} @@ -61,7 +69,7 @@ [files]="newDiscussion.files" [maxSize]="forum.maxbytes" [maxSubmissions]="forum.maxattachments" [component]="component" [componentId]="forum.cmid" [allowOffline]="true"> - +
diff --git a/src/core/features/block/components/only-title-block/core-block-only-title.html b/src/core/features/block/components/only-title-block/core-block-only-title.html index 4230b25ec..cfdeb1a04 100644 --- a/src/core/features/block/components/only-title-block/core-block-only-title.html +++ b/src/core/features/block/components/only-title-block/core-block-only-title.html @@ -1,4 +1,3 @@ - +

{{ title | translate }}

- -
+
diff --git a/src/core/features/siteplugins/components/only-title-block/core-siteplugins-only-title-block.html b/src/core/features/siteplugins/components/only-title-block/core-siteplugins-only-title-block.html index 1a4a3a63c..04564f703 100644 --- a/src/core/features/siteplugins/components/only-title-block/core-siteplugins-only-title-block.html +++ b/src/core/features/siteplugins/components/only-title-block/core-siteplugins-only-title-block.html @@ -1,5 +1,5 @@ - +

{{ title | translate }}

-
+ diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 7069ba7aa..d10a8615f 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -185,16 +185,6 @@ ion-alert.core-nohead { } } -// Ionic item divider. -ion-item-divider { - .item-detail-icon { - color: var(--ion-item-detail-icon-color); - font-size: var(--ion-item-detail-icon-font-size); - opacity: var(--ion-item-detail-icon-opacity); - padding-inline-end: 16px; - } -} - // Ionic list. ion-list.list-md { padding: 0; diff --git a/src/theme/theme.dark.scss b/src/theme/theme.dark.scss index 25b8887cc..ef871c0e6 100644 --- a/src/theme/theme.dark.scss +++ b/src/theme/theme.dark.scss @@ -67,8 +67,8 @@ } --ion-item-background: #{$ion-item-background-dark}; - --ion-item-detail-icon-color: var(--white); - ion-item-divider { + --ion-item-detail-icon-: var(--white); + ion-item-divider, ion-item.divider { --background: var(--black); --color: var(--white); } diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss index 5ffcbe996..8bd13bd09 100644 --- a/src/theme/theme.light.scss +++ b/src/theme/theme.light.scss @@ -172,10 +172,11 @@ } --item-divider-min-height: calc(var(--a11y-min-target-size) + 8px); - ion-item-divider { + ion-item-divider, ion-item.divider { --background: var(--gray-lighter); --color: inherit; - min-height: var(--item-divider-min-height); + --min-height: var(--item-divider-min-height); + min-height: var(--min-height); } --core-combobox-background: var(--ion-item-background);