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

[BREAKING] Rendre le bouton pour ouvrir la barre de navigation accessible (PIX-16754) #833

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

theotime2005
Copy link

💥 BREAKING_CHANGES

Dans le composant PixNavigation, l'attribut "menuLabel" est remplacé par:

  • "openLabel": le label lorsque le menu est fermé,
  • "closeLabel": Le label lorsque le menu est ouvert.

🎄 Problème

Pour le composant PixNavigation, on avait un simple attribut menuLabel, qui permettait d'avoir un label sur le menu, mais pas de savoir s'il était ouvert ou fermé.

🎁 Proposition

Ajouter 2 paramètres à la place de menuLabel. Le openLabel sera le label à afficher lorsque la barre est fermée et closeLabel lorsqu'elle sera ouverte.

🌟 Remarques

On a pas mis des noms par défaut aux boutons.

🎅 Pour tester

  • Se rendrer sur l'app,
  • Constater lorsque la barre est repliée, qu'il est indiqué "Ouvrir la barre",
  • Cliquer sur le bouton,
  • Constater que le message devient "Fermer la barre" et que la barre de navigation s'est ouverte.

@pix-bot-github
Copy link

Une fois l'application déployée, elle sera accessible à cette adresse https://ui-pr833.review.pix.fr
Les variables d'environnement seront accessibles sur scalingo https://dashboard.scalingo.com/apps/osc-fr1/pix-ui-review-pr833/environment

@theotime2005 theotime2005 force-pushed the pix-16754-add-labels-to-navbar-button branch from 386bec5 to 9a95cfb Compare February 26, 2025 17:38
@@ -58,7 +58,7 @@ module('Integration | Component | pix-navigation', function (hooks) {
test('it hides the burger menu', async function (assert) {
// when
const screen = await render(
hbs`<PixNavigation @navigationAriaLabel='label' @menuLabel='menu' />`,
hbs`<PixNavigation @navigationAriaLabel='label' @openLabel='open' @closeLabel='close' />`,
);
assert.notOk(screen.queryByRole('button', { name: 'menu' }));
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: on pourrait utiliser screen.getByRole("menu", {name: "open"}) pour valider qu'on a le bon label quand le menu et ouvert ou fermé

Copy link
Author

Choose a reason for hiding this comment

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

Sauf qu'on ne teste pas lorsque la taille d'écran nécessite d'afficher le bouton je crois:(

@xav-car
Copy link
Contributor

xav-car commented Feb 27, 2025

question :

Est ce que l'attribut aria-expanded aurait sa place aussi dans le PixNavigation ?

@theotime2005
Copy link
Author

question :

Est ce que l'attribut aria-expanded aurait sa place aussi dans le PixNavigation ?

Ça dépend, est-ce qu'on veut pouvoir décider que la barre est affichée même lorsque le bouton est présent?

@theotime2005 theotime2005 force-pushed the pix-16754-add-labels-to-navbar-button branch from 9a95cfb to c87d3b3 Compare February 27, 2025 16:54
@theotime2005 theotime2005 force-pushed the pix-16754-add-labels-to-navbar-button branch from c87d3b3 to 6e50fa9 Compare February 28, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants