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

Improve accessibility of visualizations #13507

Merged
merged 6 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/core_plugins/kibana/public/visualize/wizard/step_1.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ <h2 class="kuiSubTitle kuiVerticalRhythm">
ng-href="{{ getVisTypeUrl(type) }}"
tooltip="{{ getVisTypeTooltip(type) }}"
tooltip-placement="{{ getVisTypeTooltipPosition($parent.$index) }}"
aria-describedby="visDescription_{{ ::getVisTypeId(type) }}"
>
<div class="kuiGalleryButton__image">
<img
Expand Down Expand Up @@ -76,6 +77,12 @@ <h2 class="kuiSubTitle kuiVerticalRhythm">
class="kuiGalleryButton__icon kuiIcon fa-flask"
ng-if="type.isExperimental"
></div>

<span
class="sr-only"
aria-hidden="true"
id="visDescription_{{ ::getVisTypeId(type) }}"
>{{::getVisTypeTooltip(type)}}</span>
</a>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/core_plugins/kibana/public/visualize/wizard/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ module.controller('VisualizeWizardStep1', function ($scope, $route, kbnUrl, time
$scope.filteredVisTypeCategories = getVisTypeCategories();
});

$scope.getVisTypeId = type => {
return _.camelCase(type.name);
};

$scope.getVisTypeTooltip = type => {
const prefix = type.isExperimental ? '(Experimental)' : '';
return `${prefix} ${type.description}`;
Expand Down
1 change: 1 addition & 0 deletions src/core_plugins/markdown_vis/public/github_markdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
}

.markdown-body blockquote {
font-size: 1em;
padding: 0 1em;
color: @globalColorDarkGray;
border-left: 0.25em solid @globalColorLightGray;
Expand Down
8 changes: 4 additions & 4 deletions src/core_plugins/markdown_vis/public/markdown_vis_params.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="markdown-vis-options form-group">
<div>
<label>Markdown</label>
<label for="markdownVisInput">Markdown</label>
<small class="pull-right"><a target="_window" href="https://help.github.com/articles/github-flavored-markdown/">Help <i aria-hidden="true" class="fa fa-link"></i></a></small>
</div>
<div class="kuiSideBarFormRow">
<label class="kuiSideBarFormRow__label">
<label class="kuiSideBarFormRow__label" for="markdownVisFontSize">
Font Size (<span ng-bind="vis.params.fontSize"></span>pt)
</label>
<div class="kuiSideBarFormRow__control">
<input type="range" ng-model="vis.params.fontSize" class="form-control" min="8" max="36" />
<input id="markdownVisFontSize" type="range" ng-model="vis.params.fontSize" class="form-control" min="8" max="36" />
</div>
</div>
<textarea ng-model="vis.params.markdown" class="form-control" rows="20"></textarea>
<textarea id="markdownVisInput" ng-model="vis.params.markdown" class="form-control" rows="20"></textarea>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
href="{{ getHref() }}"
ng-click="onClick({ $event: $event })"
data-test-subj="appLink"
aria-label="{{::label}}"
>
<div class="global-nav-link__icon">
<img
Expand Down
4 changes: 4 additions & 0 deletions src/ui/public/styles/dark-theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -621,4 +621,8 @@
.markdown-body table tr {
border-top: 1px solid @table-border-color;
}

.markdown-body blockquote {
color: @dimmed-text-color;
}
}
1 change: 1 addition & 0 deletions src/ui/public/styles/dark-variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@body-bg: @gray3;
@text-color: #cecece;
@dimmed-text-color: #8d8d8d;

@link-color: #b7e2ea;
@link-hover-color: lighten(@link-color, 10%);
Expand Down