1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00

Merge pull request #6246 from mabashian/4070-access-4

Adds aria-label attrs to img elements

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-03-13 16:54:35 +00:00 committed by GitHub
commit 7c6bef15ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 16 deletions

View File

@ -22,7 +22,13 @@
</head>
<body>
<div class="at-Upgrade--panel">
<img src="{% static 'assets/logo-header.svg' %}" width="200"/>
<img
{% verbatim %}
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? appStrings.get('logos.TOWER_LOGO') : appStrings.get('logos.AWX_LOGO') }}"
{% endverbatim %}
src="{% static 'assets/logo-header.svg' %}"
width="200"
/>
<span class="at-Upgrade--header at-Upgrade--loading"><span class="at-Upgrade--brand" ng-bind="BRAND_NAME"></span> is Upgrading</span>
<span class="fa-4x at-Upgrade--icon"><i class="fa fa-refresh fa-spin"></i></span>
<span class="at-Upgrade--text">

View File

@ -2,7 +2,7 @@
<div class="at-Layout-topNav">
<at-top-nav-item is-shown="missingLicense" class="at-Layout-topNavItem--logo">
<a href="/#/">
<img ng-src="/static/assets/logo-header.svg">
<img ng-attr-aria-label="{{ $root.BRAND_NAME === 'Tower' ? $root.appStrings.get('logos.TOWER_LOGO') : $root.appStrings.get('logos.AWX_LOGO') }}" ng-src="/static/assets/logo-header.svg" />
</a>
</at-top-nav-item>
<div class="at-Layout-topNavRightAligner"></div>

View File

@ -78,6 +78,12 @@ function BaseStringService (namespace) {
this.TEST = t.s('TEST');
this.SUCCESSFUL_CREATION = resource => t.s('{{ resource }} successfully created', { resource: $filter('sanitize')(resource) });
this.logos = {
AWX_LOGO: t.s('Ansible AWX Logo'),
TOWER_LOGO: t.s('Ansible Tower Logo'),
CUSTOM_LOGO: t.s('Custom Logo')
};
this.deleteResource = {
HEADER: t.s('Delete'),
USED_BY: resourceType => t.s('The {{ resourceType }} is currently being used by other resources.', { resourceType }),

View File

@ -19,7 +19,11 @@
</pre>
</div>
<div class="About-modalFooter">
<img class="About-brandImg img-responsive" src="/static/assets/logo-login.svg" />
<img
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? appStrings.get('logos.TOWER_LOGO') : appStrings.get('logos.AWX_LOGO') }}"
class="About-brandImg img-responsive"
src="/static/assets/logo-login.svg"
/>
<p class="About-footerText">
<span class="About-ansibleVersion">
Ansible {{ ansible_version }}

View File

@ -195,6 +195,7 @@ angular
$rootScope.breadcrumb = {};
$rootScope.BRAND_NAME = AppStrings.get('BRAND_NAME');
$rootScope.tabTitle = `Ansible ${$rootScope.BRAND_NAME}`;
$rootScope.appStrings = AppStrings;
$rootScope.$watch('$state.current.ncyBreadcrumbLabel', function(title) {
title = (title) ? "| " + title : "";
document.title = `Ansible ${$rootScope.BRAND_NAME} ${title}`;

View File

@ -68,14 +68,14 @@
</div>
<div class="InsightsRow" ng-repeat="report in reports">
<div class="InsightsRow-title">
<img class="InsightsIcon" src="/static/assets/i_severity_critical.svg" ng-show="report.rule.severity === 'CRITICAL'"
aw-tool-tip="Critical Risk" data-placement="right" data-original-title="" title="">
<img class="InsightsIcon" src="/static/assets/i_severity_high.svg" ng-show="report.rule.severity === 'ERROR'"
aw-tool-tip="High Risk" data-placement="top" data-original-title="" title="">
<img class="InsightsIcon" src="/static/assets/i_severity_med.svg" ng-show="report.rule.severity === 'WARN'"
aw-tool-tip="Medium Risk" data-placement="top">
<img class="InsightsIcon" src="/static/assets/i_severity_low.svg" ng-show="report.rule.severity === 'INFO'"
aw-tool-tip="Low Risk" data-placement="top">
<img ng-attr-aria-label="{{ strings.get('risks.CRITICAL_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_critical.svg" ng-show="report.rule.severity === 'CRITICAL'"
aw-tool-tip="{{ strings.get('risks.CRITICAL_RISK') }}" data-placement="right" data-original-title="" title="">
<img ng-attr-aria-label="{{ strings.get('risks.HIGH_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_high.svg" ng-show="report.rule.severity === 'ERROR'"
aw-tool-tip="{{ strings.get('risks.HIGH_RISK') }}" data-placement="top" data-original-title="" title="">
<img ng-attr-aria-label="{{ strings.get('risks.MEDIUM_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_med.svg" ng-show="report.rule.severity === 'WARN'"
aw-tool-tip="{{ strings.get('risks.MEDIUM_RISK') }}" data-placement="top">
<img ng-attr-aria-label="{{ strings.get('risks.LOW_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_low.svg" ng-show="report.rule.severity === 'INFO'"
aw-tool-tip="{{ strings.get('risks.LOW_RISK') }}" data-placement="top">
<div class="InsightsRow-description"><translate>ISSUE: {{report.rule.description}}</translate></div>
<span class="Form-title--is_superuser">{{report.rule.category}}</span>
</div>

View File

@ -7,6 +7,13 @@ function InsightsStrings (BaseString) {
ns.tooltips = {
REFRESH_INSIGHTS: t.s('Refresh Insights'),
};
ns.risks = {
CRITICAL_RISK: t.s('Critical Risk'),
HIGH_RISK: t.s('High Risk'),
MEDIUM_RISK: t.s('Medium Risk'),
LOW_RISK: t.s('Low Risk'),
};
}
InsightsStrings.$inject = ['BaseStringService'];

View File

@ -5,13 +5,19 @@
<div class="LoginModal-content"
ng-class="{'is-loggedOut' : !current_user || !current_user.username}">
<div class="LoginModal-header">
<img id="login_modal_image" class="LoginModal-logoImage"
<img
id="login_modal_image"
class="LoginModal-logoImage"
ng-if="!customLogoPresent"
ng-class="{'LoginModal-logoImage--notCustom': !customLogoPresent}"
ng-src="/static/assets/{{ customLogo }}" >
<img id="login_modal_image" class="LoginModal-logoImage"
ng-if="customLogoPresent"
ng-src="{{ customLogo }}" >
ng-src="/static/assets/{{ customLogo }}"
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? appStrings.get('logos.TOWER_LOGO') : appStrings.get('logos.AWX_LOGO') }}"
/>
<img id="login_modal_image" class="LoginModal-logoImage"
ng-if="customLogoPresent"
ng-src="{{ customLogo }}"
ng-attr-aria-label="{{ appStrings.get('logos.CUSTOM_LOGO') }}"
/>
</div>
<div class="LoginModal-body">
<div class="LoginModal-alert" ng-show="!sessionExpired && !sessionLimitExpired && !attemptFailed && !thirdPartyAttemptFailed && !userLoggedOut" translate>