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

Feature/progress #579

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Feature/progress #579

wants to merge 2 commits into from

Conversation

tvanbeek
Copy link
Contributor

@tvanbeek tvanbeek commented May 10, 2022

EPFL visual style html5 <progress> bar.

Screen.Recording.2022-05-10.at.16.02.44.mov

@xentenza xentenza requested review from xentenza and alinekeller May 13, 2022 06:49
@tvanbeek
Copy link
Contributor Author

tvanbeek commented May 13, 2022

FYI, I propose to use the <progress> element in favor of the Bootstrap implementation where they use a div element with class .progress.

Pros

  1. Using <progress> is semantically correct
  2. We can use the :indeterminate pseudo class to animate a continuous loading state

Cons

  1. The reason Bootstrap uses div.progress is so they can more easily put a value inside the progress like so:
<div class="progress">
  <div class="progress-bar" style="width: 25%;">25%</div>
</div>

Copy link
Contributor

@alinekeller alinekeller left a comment

Choose a reason for hiding this comment

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

The <progress> element is also better for accessibility, so yay !
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role#best_practices

You mention in the cons that a value can be added in the progress <div>, but it can also be done with the <progress> element https://www.w3schools.com/tags/tag_progress.asp – and it would be useful for accessibility.

@tvanbeek
Copy link
Contributor Author

You mention in the cons that a value can be added in the progress <div>, but it can also be done with the <progress> element https://www.w3schools.com/tags/tag_progress.asp – and it would be useful for accessibility.

Yes good point!

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