Skip to content

Commit

Permalink
Added aria labels and roles to buttons, links, tables
Browse files Browse the repository at this point in the history
  • Loading branch information
littlesvensson committed Jan 16, 2025
1 parent 49e0a5c commit bc24ed4
Show file tree
Hide file tree
Showing 39 changed files with 163 additions and 154 deletions.
2 changes: 1 addition & 1 deletion dojo/templates/dojo/action_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h3>
{{ obj }} History
<div class="dropdown pull-right">
<button id="show-filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters" aria-label="Filter"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
<button id="show-filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters" aria-label="Filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
</div>
</h3>
</div>
Expand Down
2 changes: 1 addition & 1 deletion dojo/templates/dojo/benchmark.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h4>{{ benchmark_type.name }} {{ benchmark_type.version }} - <span id="head__des
data-content="{% trans "Publish will display the ASVS Level on the product and other areas in DefectDojo. Check this once you have completed the assessment." %}"></span>
</label>
{{ benchmark_summary_form.publish }}
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" aria-expanded="false" data-toggle="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" aria-expanded="false" data-toggle="dropdown" aria-label="Filter options">
<i class="fa-solid fa-filter"></i>
<span class="caret"></span>
</button>
Expand Down
2 changes: 1 addition & 1 deletion dojo/templates/dojo/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<h3 class="has-filters">
Components
<div class="dropdown pull-right">
<button id="show-filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
<button id="show-filters" aria-label="Filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
</div>
</h3>
</div>
Expand Down
4 changes: 2 additions & 2 deletions dojo/templates/dojo/dev_env.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<h3 class="has-filters">
Environment List
<div class="dropdown pull-right">
<button id="show-filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
<button id="show-filters" aria-label="Filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
{% if "dojo.add_development_environment"|has_configuration_permission:request %}
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-expanded="true">
data-toggle="dropdown" aria-expanded="true" aria-label="Environment actions">
<span class="fa-solid fa-screwdriver-wrench"></span>
<span class="caret"></span>
</button>
Expand Down
6 changes: 3 additions & 3 deletions dojo/templates/dojo/endpoints.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<h3 class="has-filters">
{{ name }}
<div class="dropdown pull-right">
<button id="show-filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
<button id="show-filters" aria-label="Filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
{% if not product_tab or product_tab and product_tab.product|has_object_permission:"Endpoint_Add" %}
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-expanded="true">
data-toggle="dropdown" aria-expanded="true" aria-label="Endpoint actions">
<span class="fa-solid fa-screwdriver-wrench"></span>
<span class="caret"></span>
</button>
Expand Down Expand Up @@ -52,7 +52,7 @@ <h3 class="has-filters">
</button>
{% endif %}
{% if not product_tab or product_tab and product_tab.product|has_object_permission:"Endpoint_Delete" %}
<button type="button" class="btn btn-sm btn-primary" data-toggle="tooltip" data-placement="bottom" title="Delete Endpoint">
<button type="button" class="btn btn-sm btn-primary" data-toggle="tooltip" data-placement="bottom" title="Delete Endpoint" aria-label="Delete endpoint">
<a class="white-color delete-bulk" href="#" alt="Delete Endpoints">
<i class="fa-solid fa-trash"></i>
</a>
Expand Down
42 changes: 21 additions & 21 deletions dojo/templates/dojo/engagement.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3 class="has-filters">
</a>
</li>
</ul>
<button id="show-filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
<button id="show-filters" aria-label="Filters" data-toggle="collapse" data-target="#the-filters" class="btn btn-primary toggle-filters"> <i class="fa-solid fa-filter"></i> <i class="caret"></i> </button>
</div>
</h3>
</div>
Expand Down Expand Up @@ -72,70 +72,70 @@ <h3 class="has-filters">
<td class="nowrap">
<div class="align-top">
<div class="dropdown">
<a href="#" class="dropdown-toggle pull-left" data-toggle="dropdown">&nbsp;<i class="fa-solid fa-ellipsis-vertical"></i>&nbsp;</a>
<ul class="dropdown-menu">
<li>
<a class="" href="{% url 'view_engagement' e.id %}">
<a href="#" aria-label="More engagement options" class="dropdown-toggle pull-left" data-toggle="dropdown" id="dropdownMenuToggle" role="button">&nbsp;<i class="fa-solid fa-ellipsis-vertical"></i>&nbsp;</a>
<ul aria-labelledby="dropdownMenuToggle" class="dropdown-menu" role="menu">
<li role="presentation">
<a class="" href="{% url 'view_engagement' e.id %}" role="menuitem">
<i class="fa-solid fa-rectangle-list"></i> View
</li>
{% if e|has_object_permission:"Engagement_Edit" %}
<li>
<a class="" href="{% url 'edit_engagement' e.id %}">
<li role="presentation">
<a class="" href="{% url 'edit_engagement' e.id %}" role="menuitem">
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>
</li>
<li class="divider"></li>
<li class="divider" role="separator"></li>
{% endif %}
{% if e|has_object_permission:"Test_Add" %}
<li role="presentation">
<a class="" href="{% url 'add_tests' e.id %}">
<a class="" href="{% url 'add_tests' e.id %}" role="menuitem">
<i class="fa-solid fa-plus"></i> Add Tests
</a>
</li>
{% endif %}
{% if e|has_object_permission:"Import_Scan_Result" %}
<li role="presentation">
<a class="" href="{% url 'import_scan_results' e.id %}">
<a class="" href="{% url 'import_scan_results' e.id %}" role="menuitem">
<i class="fa-solid fa-upload"></i> Import Scan Results
</a>
</li>
{% endif %}
<li class="divider"></li>
<li class="divider" role="separator"></li>
<li role="presentation">
<a href="{% url 'engagement_open_findings' e.id %}">
<a href="{% url 'engagement_open_findings' e.id %}" role="menuitem">
<i class="fa-solid fa-file-lines"></i> View Active Findings
</a>
</li>
<li role="presentation">
<a href="{% url 'engagement_verified_findings' e.id %}">
<a href="{% url 'engagement_verified_findings' e.id %}" role="menuitem">
<i class="fa-solid fa-file-lines"></i> View Active and Verified Findings
</a>
</li>
<li role="presentation">
<a href="{% url 'engagement_closed_findings' e.id %}">
<a href="{% url 'engagement_closed_findings' e.id %}" role="menuitem">
<i class="fa-solid fa-file-lines"></i> View Mitigated Findings
</a>
</li>
<li role="presentation">
<a href="{% url 'engagement_accepted_findings' e.id %}">
<a href="{% url 'engagement_accepted_findings' e.id %}" role="menuitem">
<i class="fa-solid fa-file-lines"></i> View Accepted Findings
</a>
</li>
<li role="presentation">
<a href="{% url 'engagement_all_findings' e.id %}">
<a href="{% url 'engagement_all_findings' e.id %}" role="menuitem">
<i class="fa-solid fa-file-lines"></i> View All Findings
</a>
</li>
<li class="divider"></li>
<li class="divider" role="separator"></li>
<li role="presentation">
<a href="{% url 'engagement_report' e.id %}?title=&active=1&verified=1&false_p=2&duplicate=2">
<a href="{% url 'engagement_report' e.id %}?title=&active=1&verified=1&false_p=2&duplicate=2" role="menuitem">
<i class="fa-solid fa-file-lines"></i> Engagement Report
</a>
</li>
{% if e|has_object_permission:"Engagement_Delete" %}
<li class="divider"></li>
<li>
<a class="text-danger" href="{% url 'delete_engagement' e.id %}">
<li class="divider" role="separator"></li>
<li role="presentation">
<a class="text-danger" href="{% url 'delete_engagement' e.id %}" role="menuitem">
<i class="fa-solid fa-trash"></i> Delete Engagement
</a>
</li>
Expand Down
Loading

0 comments on commit bc24ed4

Please sign in to comment.