Skip to content

feat: Accessibility for project detail page and file browser #206

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

Merged
merged 17 commits into from
Jun 25, 2025

Conversation

davidverdu
Copy link
Contributor

fixes: #155

  • Add accessibility to project detail view
  • Add keyboard support for file browser in upload bundles section

@davidverdu davidverdu requested a review from abujeda June 23, 2025 11:28
@davidverdu davidverdu self-assigned this Jun 23, 2025
Comment on lines +5 to +23
<nav aria-label="<%= t('.nav_file_browser_label') %>">
<ol data-file-browser-target="pathDisplay" class="breadcrumb d-flex align-items-center flex-wrap gap-2">
<% path_parts = current_path.split('/').reject(&:blank?) %>
<% accumulated_path = '/' %>
<% path_parts.each do |part| %>
<li>
<% accumulated_path = File.join(accumulated_path, part) %>
<span class="text-muted">/</span>
<a class="breadcrumb-folder text-body text-decoration-none"
tabindex="0"
data-entry-path="<%= accumulated_path %>"
data-entry-type="folder"
data-action="dblclick->file-browser#handleDoubleClick keydown->file-browser#handleKeydown">
<i class="bi bi-folder-fill" aria-hidden="true"></i> <%= part %>
</a>
</li>
<% end %>
</ol>
</nav>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

path browser redefined as a ul list with li items inside a nav tag, to make it more understandable for accessibility devices. tabindex="0" and the keydown handler in data-action allow the usage of keyboard

Comment on lines +96 to +97
tabindex="0"
data-action="dragstart->file-browser#handleDragStart dragend->file-browser#handleDragEnd dblclick->file-browser#handleDoubleClick keydown->file-browser#handleKeydown">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these lines allow the use of keyboard

@@ -11,7 +11,7 @@
<%= t('.file_drop_text') %>
</div>
<div data-file-drop-target="icon" class="position-absolute translate-middle-y drop-text d-none" style="top: 50%; left: 1rem; z-index: 100;">
<i class="bi bi-plus-square-fill fs-1"></i>
<i class="bi bi-plus-square-fill fs-1" aria-hidden="true"></i>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need a title or hidden span here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it

Copy link
Contributor

@abujeda abujeda left a comment

Choose a reason for hiding this comment

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

LGTM - Just a comment in case we are missing a title or hidden label.

@davidverdu davidverdu merged commit 783f18b into main Jun 25, 2025
1 check passed
@davidverdu davidverdu deleted the accessibility-project-detail branch June 25, 2025 13:15
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.

Accessibility - WCAG 2.1 Level A and AA - Project detail page
2 participants