Git Product home page Git Product logo

Comments (6)

mnajdova avatar mnajdova commented on June 22, 2024 2

Hey @m4theushw, nice to see a familiar face :)

If it's a bug, I think it's just the case of aligning the buttons with justify-content: flex-end instead of flex-direction: row-reverse.

I would definitely consider this a bug, and what you propose makes sense. I am marking it as a "good first issue", so whoever wants can take it!

from material-ui.

brijeshb42 avatar brijeshb42 commented on June 22, 2024

Seems to be a bit of both. You can change the tab order by passing orientation="horizontal" prop value, but the alignment then starts from left.

So this is the final change to work around the current issue -

<DialogActions
  orientation="horizontal"
  sx={{ justifyContent: "flex-end" }}
>
...

from material-ui.

yasminebeji avatar yasminebeji commented on June 22, 2024

@m4theushw I was thinking, maybe to address the issue with actions appearing in the wrong order in the modal, we could try adjusting the button alignment. It might help if we ensure the Tab key navigation moves the focus forward logically through the actions/buttons.

from material-ui.

siriwatknp avatar siriwatknp commented on June 22, 2024

Hey @m4theushw, nice to see a familiar face :)

If it's a bug, I think it's just the case of aligning the buttons with justify-content: flex-end instead of flex-direction: row-reverse.

I would definitely consider this a bug, and what you propose makes sense. I am marking it as a "good first issue", so whoever wants can take it!

The behavior is intended because I think tab should focus on the primary action first.

from material-ui.

m4theushw avatar m4theushw commented on June 22, 2024

The behavior is intended because I think tab should focus on the primary action first.

@siriwatknp I understand your intention but for this to work properly it needs to be handled by the developer. Reversing the visual order of the items breaks the accessibility for blind users. They expect Tab to move the focus forward but it goes backwards.

From https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction:

Using the flex-direction property with values of row-reverse or column-reverse will create a disconnect between the visual presentation of content and DOM order. This will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen reader. If the visual (CSS) order is important, then screen reader users will not have access to the correct reading order.

from material-ui.

Gavin-10 avatar Gavin-10 commented on June 22, 2024

Hey, has anyone started working on this issue yet? If not I'd love to take it.

from material-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.