mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Support for ARIA
This commit is contained in:
parent
45f216b8a1
commit
6b3cdb5033
42 changed files with 159 additions and 148 deletions
|
@ -2,9 +2,9 @@
|
|||
{{#each categories as |cat|}}
|
||||
{{#if cat}}
|
||||
<div class="category">
|
||||
<i class="dicon {{constants.Icon.Category}}" />
|
||||
<i class="dicon {{constants.Icon.Category}}" title="Category" />
|
||||
<div class="name">{{cat}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#each tagz as |tg|}}
|
||||
{{#link-to "search" (query-params filter=tg matchTag=true matchContent=false matchFile=false matchDoc=false) class="hashtag"}}
|
||||
<i class="dicon {{constants.Icon.Tag}}" />
|
||||
<i class="dicon {{constants.Icon.Tag}}" title="Tag" />
|
||||
<div class="name">{{tg}}</div>
|
||||
{{/link-to}}
|
||||
{{/each}}
|
||||
|
|
|
@ -13,19 +13,19 @@
|
|||
|
||||
{{#ui/ui-toolbar-icon icon=constants.Icon.Sort color=constants.Color.Gray tooltip="Sort"}}
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn="click" showOn="click" isShown=false placement="bottom-end" as |attacher|}}
|
||||
<i class="dicon {{constants.Icon.Cross}} closer" {{action attacher.hide}}/>
|
||||
<i class="dicon {{constants.Icon.Cross}} closer" {{action attacher.hide}} role="button" tabindex="0" aria-label="Close" />
|
||||
<div class="container">
|
||||
<Ui::UiSpacer @size="100" />
|
||||
|
||||
<div class="text-center">
|
||||
<ul class="ui-option-picker ui-option-picker-horiz">
|
||||
<li class="option {{if sortBy.name "selected"}}" {{action "onSetSort" "name"}}>
|
||||
<li class="option {{if sortBy.name "selected"}}" {{action "onSetSort" "name"}} role="button" tabindex="0" aria-label="Sort by name">
|
||||
<div class="text">Name</div>
|
||||
</li>
|
||||
<li class="option {{if sortBy.created "selected"}}" {{action "onSetSort" "created"}}>
|
||||
<li class="option {{if sortBy.created "selected"}}" {{action "onSetSort" "created"}} role="button" tabindex="0" aria-label="Sort by created">
|
||||
<div class="text">Created date</div>
|
||||
</li>
|
||||
<li class="option {{if sortBy.updated "selected"}}" {{action "onSetSort" "updated"}}>
|
||||
<li class="option {{if sortBy.updated "selected"}}" {{action "onSetSort" "updated"}} role="button" tabindex="0" aria-label="Sort by revised">
|
||||
<div class="text">Last updated</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -35,10 +35,10 @@
|
|||
|
||||
<div class="text-center">
|
||||
<ul class="ui-option-picker ui-option-picker-horiz">
|
||||
<li class="option {{if sortBy.asc "selected"}}" {{action "onSetSort" "asc"}}>
|
||||
<li class="option {{if sortBy.asc "selected"}}" {{action "onSetSort" "asc"}} role="button" tabindex="0" aria-label="Sort ascending">
|
||||
<div class="text">Ascending</div>
|
||||
</li>
|
||||
<li class="option {{if sortBy.desc "selected"}}" {{action "onSetSort" "desc"}}>
|
||||
<li class="option {{if sortBy.desc "selected"}}" {{action "onSetSort" "desc"}} role="button" tabindex="0" aria-label="Sort descending">
|
||||
<div class="text">Descending</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -93,15 +93,15 @@
|
|||
<div class="sequence">
|
||||
{{#if document.isSequenced}}
|
||||
{{#if showingAllDocs}}
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}" {{action "onPinSequence" document.id "u"}} title="Move up" />
|
||||
<i class="dicon {{constants.Icon.ArrowSmallDown}}" {{action "onPinSequence" document.id "d"}} title="Move down" />
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}" {{action "onPinSequence" document.id "u"}} title="Move up" role="button" tabindex="0"/>
|
||||
<i class="dicon {{constants.Icon.ArrowSmallDown}}" {{action "onPinSequence" document.id "d"}} title="Move down" role="button" tabindex="0" />
|
||||
{{/if}}
|
||||
<i class="dicon {{constants.Icon.Cross}}" {{action "onUnpin" document.id}} title="Unpin" />
|
||||
<i class="dicon {{constants.Icon.Cross}}" {{action "onUnpin" document.id}} title="Unpin" role="button" tabindex="0" />
|
||||
{{else}}
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}" {{action "onPin" document.id}} title="Pin" />
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}" {{action "onPin" document.id}} title="Pin" role="button" tabindex="0" />
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="checkbox" {{action "selectDocument" document.id}}>
|
||||
<div class="checkbox" {{action "selectDocument" document.id}} role="checkbox" tabindex="0">
|
||||
{{#if document.selected}}
|
||||
<i class="dicon {{constants.Icon.CheckboxChecked}}"/>
|
||||
{{else}}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
|
||||
{{#if isSpaceAdmin}}
|
||||
{{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonColor=constants.Color.Red show=showDeleteDialog onAction=(action "onDeleteBlock")}}
|
||||
<p>Are you sure you want to delete this re-usable content block?</p>
|
||||
{{/ui/ui-dialog}}
|
||||
{{/if}}
|
||||
{{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonColor=constants.Color.Red show=showDeleteDialog onAction=(action "onDeleteBlock")}}
|
||||
<p>Are you sure you want to delete this re-usable content block?</p>
|
||||
{{/ui/ui-dialog}}
|
||||
{{/if}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div class="space-admin">
|
||||
<div class="categories">
|
||||
<form class="form" onsubmit={{action "onAdd"}}>
|
||||
<form class="form" onsubmit={{action "onAdd"}} role="form">
|
||||
<div class="form-group">
|
||||
{{focus-input id="new-category-name" type="text" class="form-control mousetrap" placeholder="Category name" value=newCategory}}
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
desc="Set space visibility, icon and label"
|
||||
icon=constants.Icon.Settings}}
|
||||
|
||||
<form>
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
{{focus-input id="space-name" type="text" value=spaceName class=(if hasNameError "form-control is-invalid" "form-control") placeholder="Space name" autocomplete="off"}}
|
||||
|
@ -26,7 +26,7 @@
|
|||
<div class="ui-icon-picker">
|
||||
<ul class="list">
|
||||
{{#each iconList as |icon|}}
|
||||
<li class="item {{if (eq spaceIcon icon) "selected"}}" {{action "onSetIcon" icon}}>
|
||||
<li class="item {{if (eq spaceIcon icon) "selected"}}" {{action "onSetIcon" icon}} role="button" tabindex="0">
|
||||
{{ui/ui-icon-meta icon=icon}}
|
||||
</li>
|
||||
{{/each}}
|
||||
|
@ -37,9 +37,9 @@
|
|||
<div class="form-group">
|
||||
<label>Label</label>
|
||||
<ul class="space-label-picker">
|
||||
<li class="label none {{if (eq spaceLabel "") "selected"}}" {{action "onSetLabel" ""}}>None</li>
|
||||
<li class="label none {{if (eq spaceLabel "") "selected"}}" {{action "onSetLabel" ""}} role="button" tabindex="0">None</li>
|
||||
{{#each labels as |label|}}
|
||||
<li class="label {{if (eq spaceLabel label.id) "selected"}}"
|
||||
<li class="label {{if (eq spaceLabel label.id) "selected"}}" role="button" tabindex="0"
|
||||
style={{label.bgColor}}
|
||||
{{action "onSetLabel" label.id}} title={{label.name}}>
|
||||
{{label.name}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div class="view-customize">
|
||||
<div class="explain-user-perms">
|
||||
<div class="title" {{action "toggleSpacePerms"}}>
|
||||
<div class="title" {{action "toggleSpacePerms"}} role="button" tabindex="0">
|
||||
Space Permissions Explained
|
||||
{{#if showSpacePermExplain}}
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}"></i>
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
<Ui::UiSpacer @size="200" />
|
||||
|
||||
<div class="title" {{action "toggleDocumentPerms"}}>
|
||||
<div class="title" {{action "toggleDocumentPerms"}} role="button" tabindex="0">
|
||||
Document Permissions Explained
|
||||
{{#if showDocumentPermExplain}}
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}"></i>
|
||||
|
@ -102,8 +102,8 @@
|
|||
<i class="dicon {{constants.Icon.TriangleSmallDown}} cursor-pointer"/>
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false}}
|
||||
<div class="menu">
|
||||
<a class="item" href="#" {{action "onBulkPermission" permission true}}>Grant all</a>
|
||||
<a class="item" href="#" {{action "onBulkPermission" permission false}}>Revoke all</a>
|
||||
<a class="item" href="#" {{action "onBulkPermission" permission true}} role="button" tabindex="0">Grant all</a>
|
||||
<a class="item" href="#" {{action "onBulkPermission" permission false}} role="button" tabindex="0">Revoke all</a>
|
||||
</div>
|
||||
{{/attach-popover}}
|
||||
{{#if (eq permission.who "role")}}
|
||||
|
|
|
@ -2,39 +2,39 @@
|
|||
<div class="section">
|
||||
<div class="title">filter</div>
|
||||
<div class="list">
|
||||
<div class="item {{if (eq selectedFilter "space") "selected"}}" {{action "onDocumentFilter" "space" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "space") "selected"}}" {{action "onDocumentFilter" "space" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">All ({{documents.length}})</div>
|
||||
</div>
|
||||
{{#if hasCategories}}
|
||||
{{#if (gt rootDocCount 0)}}
|
||||
<div class="item {{if (eq selectedFilter "uncategorized") "selected"}}" {{action "onDocumentFilter" "uncategorized" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "uncategorized") "selected"}}" {{action "onDocumentFilter" "uncategorized" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Uncategorized ({{rootDocCount}})</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if permissions.documentTemplate}}
|
||||
<div class="item {{if (eq selectedFilter "template") "selected"}}" {{action "onDocumentFilter" "template" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "template") "selected"}}" {{action "onDocumentFilter" "template" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Templates ({{templates.length}})</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if permissions.documentLifecycle}}
|
||||
<div class="item {{if (eq selectedFilter "draft") "selected"}}" {{action "onDocumentFilter" "draft" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "draft") "selected"}}" {{action "onDocumentFilter" "draft" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Drafts ({{documentsDraft.length}})</div>
|
||||
</div>
|
||||
<div class="item {{if (eq selectedFilter "live") "selected"}}" {{action "onDocumentFilter" "live" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "live") "selected"}}" {{action "onDocumentFilter" "live" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Live ({{documentsLive.length}})</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="item {{if (eq selectedFilter "add") "selected"}}" {{action "onDocumentFilter" "add" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "add") "selected"}}" {{action "onDocumentFilter" "add" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Added recently ({{recentAdd.length}})</div>
|
||||
</div>
|
||||
<div class="item {{if (eq selectedFilter "update") "selected"}}" {{action "onDocumentFilter" "update" space.id}}>
|
||||
<div class="item {{if (eq selectedFilter "update") "selected"}}" {{action "onDocumentFilter" "update" space.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Filter}} />
|
||||
<div class="name">Updated recently ({{recentUpdate.length}})</div>
|
||||
</div>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<div class="list">
|
||||
{{#if categories}}
|
||||
{{#each categories as |cat|}}
|
||||
<div class="item {{if cat.selected "selected"}}" {{action "onDocumentFilter" "category" cat.id}}>
|
||||
<div class="item {{if cat.selected "selected"}}" {{action "onDocumentFilter" "category" cat.id}} role="button" tabindex="0">
|
||||
<i class={{concat "dicon " constants.Icon.Category}} />
|
||||
<div class="name">{{cat.category}} ({{cat.docCount}})</div>
|
||||
</div>
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
{{#if (or hasDocuments pinState.isPinned session.authenticated)}}
|
||||
{{#ui/ui-toolbar-dropdown label="Content" arrow=true}}
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false}}
|
||||
<div class="menu">
|
||||
<div class="menu" role="menu">
|
||||
{{#if pinState.isPinned}}
|
||||
<li class="item" {{action "onUnpin"}}>Remove bookmark</li>
|
||||
<li class="item" {{action "onUnpin"}} role="button" tabindex="0">Remove bookmark</li>
|
||||
{{else if session.authenticated}}
|
||||
<li class="item" {{action "onPin"}}>Bookmark</li>
|
||||
<li class="item" {{action "onPin"}} role="button" tabindex="0">Bookmark</li>
|
||||
{{/if}}
|
||||
{{#if hasDocuments}}
|
||||
<li class="item" {{action "onShowExport"}}>Download</li>
|
||||
<li class="item" {{action "onShowExport"}} role="button" tabindex="0">Download</li>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/attach-popover}}
|
||||
|
@ -19,12 +19,12 @@
|
|||
{{#if permissions.documentAdd}}
|
||||
{{#ui/ui-toolbar-dropdown label="New" arrow=true}}
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false}}
|
||||
<div class="menu">
|
||||
<li class="item" {{action "onShowEmptyDocModal"}}>Blank canvas</li>
|
||||
<div class="menu" role="menu">
|
||||
<li class="item" {{action "onShowEmptyDocModal"}} role="button" tabindex="0">Blank canvas</li>
|
||||
{{#if hasTemplates}}
|
||||
<li class="item" {{action "onShowTemplateDocModal"}}>From template</li>
|
||||
<li class="item" {{action "onShowTemplateDocModal"}} role="button" tabindex="0">From template</li>
|
||||
{{/if}}
|
||||
<li class="item" {{action "onShowImportDocModal"}}>Import files</li>
|
||||
<li class="item" {{action "onShowImportDocModal"}} role="button" tabindex="0">Import files</li>
|
||||
</div>
|
||||
{{/attach-popover}}
|
||||
{{/ui/ui-toolbar-dropdown}}
|
||||
|
@ -41,7 +41,7 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">Blank Canvas</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit={{action "onAddEmptyDoc"}}>
|
||||
<form onsubmit={{action "onAddEmptyDoc"}} role="form">
|
||||
<div class="form-group">
|
||||
<label for="empty-doc-name">Document Name</label>
|
||||
{{input id="empty-doc-name" type="text" value=emptyDocName placeholder="Enter name" class=(if emptyDocNameError "form-control mousetrap is-invalid" "form-control mousetrap") autocomplete="off"}}
|
||||
|
@ -61,7 +61,7 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">From Template</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit={{action "onAddTemplateDoc"}}>
|
||||
<form onsubmit={{action "onAddTemplateDoc"}} role="form">
|
||||
<div class="form-group">
|
||||
<label for="template-doc-name">Document Name</label>
|
||||
{{input id="template-doc-name" type="text" value=templateDocName placeholder="Enter name" class=(if templateDocNameError "form-control mousetrap is-invalid" "form-control mousetrap") autocomplete="off"}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue