Skip to content
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
1 change: 1 addition & 0 deletions lang/en/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
'theme_share_instructions' => 'Publish this theme through your statamic.com account to make it available to others.',
'try_again_in_seconds' => '{0,1}Try again now.|Try again in :count seconds.',
'try_again_in_minutes' => 'Try again in a minute.|Try again in :count minutes.',
'tree_aria_instructions' => 'Use arrow keys to navigate. Alt plus arrow keys to reorder.',
'two_factor_account_requirement' => 'Your account requires two-factor authentication. Please enable it before proceeding.',
'two_factor_challenge_code_instructions' => 'Enter the 6-digit code from your authenticator app to confirm access to your account.',
'two_factor_enable_introduction' => 'When enabled, you will be prompted for a secure, random token from your phone\'s authenticator app every time you log in.',
Expand Down
4 changes: 4 additions & 0 deletions resources/css/components/page-tree.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@
@apply pt-1 rounded-t-2xl;
}
}

.he-tree-sr-only {
@apply sr-only;
}
11 changes: 11 additions & 0 deletions resources/js/components/structures/PageTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
:each-droppable="eachDroppable"
:max-level="maxDepth"
:stat-handler="statHandler"
:aria-label="__('Tree Structure')"
@after-drop="afterDrop"
@open:node="nodeOpened"
@close:node="nodeClosed"
Expand Down Expand Up @@ -149,6 +150,16 @@ export default {
this.getPages();
},

loading(loading) {
if (!loading) {
this.$nextTick(() => {
if (this.$refs.tree) {
this.$refs.tree.ariaInstructions = __('messages.tree_aria_instructions');
}
});
}
},

collapsedState: {
deep: true,
handler(state) {
Expand Down
7 changes: 7 additions & 0 deletions resources/js/pages/preferences/nav/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
:indent="24"
:dir="direction"
:stat-handler="statHandler"
:aria-label="__('Tree Structure')"
keep-placeholder
trigger-class="page-move"
:each-droppable="eachDroppable"
Expand Down Expand Up @@ -289,6 +290,12 @@ export default {
mounted() {
this.setInitialNav(this.nav);
this.addToCommandPalette();

this.$nextTick(() => {
if (this.$refs.tree) {
this.$refs.tree.ariaInstructions = __('messages.tree_aria_instructions');
}
});
},

computed: {
Expand Down
Loading