Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve accessibility for screen readers #5774

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

leiyre
Copy link
Contributor

@leiyre leiyre commented Dec 20, 2024

This PR includes some accessibility improvements and enhancements for small screens

Copy link

The URL of the deployed environment for this PR is https://argilla-quickstart-pr-5774-ki24f765kq-no.a.run.app

@okaditya84
Copy link

The PR title is not formatted correctly. Ensure it starts with a capital letter and verify that it includes an issue number. The PR description lacks detail regarding the necessity of the change and expected outcomes. Additionally, comments in the code should be more descriptive and eliminate any trivial comments for better clarity.

@@ -16,8 +16,8 @@
-->

<template>
<div class="breadcrumbs">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a period at the end of comments if they form complete sentences.

@@ -29,11 +29,12 @@
v-else
class="breadcrumbs__item --action"
@click="onBreadcrumbAction(breadcrumb)"
:aria-current="breadcrumb.name"
>{{ breadcrumb.name }}</span
>
</li>
</ul>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider providing a more descriptive comment about this component's functionality.

@@ -179,7 +184,11 @@ export default {
return "--focused-form";
},
formHasFocus() {
return this.autofocusPosition || this.autofocusPosition == 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider simplifying this conditional logic to reduce nesting. An early return could enhance readability.

@okaditya84
Copy link

The PR title does not start with a capital letter and lacks an issue number. The PR description needs more detail about the necessity of the change and expected outcomes.

@@ -16,8 +16,8 @@
-->

<template>
<div class="breadcrumbs">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the div to a nav element for semantic correctness, as it contains navigation links.

<div class="breadcrumbs">
<ul role="navigation">
<nav aria-label="Breadcrumb" class="breadcrumbs">
<ul>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure to include an aria-label for accessibility purposes.

@click="toggle($event)"
:aria-label="`${name} ${checked ? 'on' : 'off'}`"
:aria-checked="checked ? 'true' : 'false'"
>
<div class="switch-thumb" :style="styles">
<input

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider changing the input element's tabindex to '0' for better accessibility.

@@ -179,7 +184,11 @@ export default {
return "--focused-form";
},
formHasFocus() {
return this.autofocusPosition || this.autofocusPosition == 0;
if (!this.$platform.isMobile) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nested if condition can be simplified to improve readability. Consider using an early return pattern.

@@ -1,10 +1,14 @@
<template>
<div class="edition-user-info">
<div class="form-group circle-and-role">
<span v-circle="{ size: 'MEDIUM' }">
<span aria-hidden="true" v-circle="{ size: 'MEDIUM' }">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add aria-hidden="true" for decorative elements to improve accessibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants