Skip to content

Conversation

@vanpertsch
Copy link
Contributor

@vanpertsch vanpertsch commented Apr 25, 2022

add focus-trap (https://github.com/focus-trap/focus-trap) for accessibility

focus-trap.mp4

Signed-off-by: Vanessa Pertsch vanessa.pertsch@posteo.de

@vanpertsch vanpertsch added the 2. developing Work in progress label Apr 25, 2022
@vanpertsch vanpertsch self-assigned this Apr 25, 2022
@vanpertsch vanpertsch mentioned this pull request Apr 25, 2022
10 tasks
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@posteo.de>
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@szaimen
Copy link
Contributor

szaimen commented May 2, 2022

Does it also work with multiple modals on top of each other e.g. like the text app uses?

@skjnldsv
Copy link
Contributor

skjnldsv commented May 3, 2022

Does it also work with multiple modals on top of each other e.g. like the text app uses?

Tested, works fine

<template>
	<div>
		<button @click="modal = true">Show Modal</button>
		<modal v-if="modal" @close="modal = false" size="small">
			<div class="modal__content">Hello world</div>

			<button @click="modal2 = true">Show Modal 2</button>
			<modal v-if="modal2" @close="modal2 = false" size="small">
				<div class="modal__content">Hello world 2</div>
			</modal>

		</modal>
	</div>
</template>
<script>
export default {
	data() {
		return {
			modal: false,
			modal2: false
		}
	},
}
</script>

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request feature: modal Related to the modal component accessibility Making sure we design for the widest range of people possible, including those who have disabilities and removed 2. developing Work in progress labels May 3, 2022
@vanpertsch vanpertsch merged commit 9351c22 into master May 3, 2022
@vanpertsch vanpertsch deleted the modal-focus-trap branch May 3, 2022 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish accessibility Making sure we design for the widest range of people possible, including those who have disabilities enhancement New feature or request feature: modal Related to the modal component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants