Skip to content

Commit

Permalink
More readability
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusKjeldgaard committed Nov 19, 2024
1 parent ecd18b2 commit f993012
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2>Accessibility</h2>
back to where it was before showing the alert.
</p>

<h3>Meaningful titles</h3>
<h3>Labeling</h3>
<p>
The alert title is automatically used as a label to add context for assistive technologies. For
example, screen readers use the label to announce when the modal dialog appears and to give
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,15 +679,15 @@ <h2 #accessibility>Accessibility</h2>
dismisses the modal.
</p>

<h3>Labeling modals</h3>
<h3>Labeling</h3>
<p>
The provided
<code>kirby-page-title</code>
is automatically used as a label to add context for assistive technologies. For example, screen
readers use the label to announce when the modal dialog appears and to give proper context when
interacting with the content within.
</p>
<p>This emphasizes the importance of providing a meaningful title for all alerts.</p>
<p>This emphasizes the importance of providing a meaningful title for all modals.</p>

<h4>Compact Modals</h4>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ContentObserverHostComponent implements OnDestroy {
}
}

describe('Content Mutation Observer', () => {
describe('observeContent', () => {
let spectator: Spectator<ContentObserverHostComponent>;

const createComponent = createComponentFactory({
Expand Down
4 changes: 2 additions & 2 deletions libs/designsystem/helpers/src/content-mutation-observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function shouldIgnoreMutationRecord(record: MutationRecord) {
export function observeContent(
observedElement: HTMLElement,
contentChangedCallback: () => void,
disconnect$: Observable<void>
unobserve$?: Observable<void>
): MutationObserver {
const mutationObserver = new MutationObserver((mutations) => {
const filteredMutations = mutations.filter((mutation) => !shouldIgnoreMutationRecord(mutation));
Expand All @@ -46,7 +46,7 @@ export function observeContent(
subtree: true,
});

disconnect$.subscribe(() => {
unobserve$?.subscribe(() => {
mutationObserver.disconnect();
});

Expand Down
2 changes: 1 addition & 1 deletion libs/designsystem/helpers/src/element-ancestor-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const elementHasAncestor = (
};

/*
* Utility function to get the closest ancestor modal and
* Utility function to find the closest ancestor modal and
* get the element with a dialog role from within its shadow root.
*/
export function getModalDialogAncestor(currentElement: HTMLElement): HTMLElement | undefined {
Expand Down

0 comments on commit f993012

Please sign in to comment.