Tutorial Layer — Usage Guide ◎ MYDB Notepad | Ink it while you think it.

Created: 2026-04-20

Tutorial Layer — Usage 
Guide

Tutorial Layer — Usage Guide

New-Functions  tutorial Layer

The Tutorial Layer — Developer & Usage Guide

The Tutorial Layer is an overlay system that automatically detects UI elements and provides contextual explanations when users interact with them. It requires no manual wiring per component.


How users activate it

Once activated, the system highlights the element and displays an explanation panel.


How to disable it

This permanently stores a disabled flag in localStorage under nanostate.

To reset:

localStorage.removeItem("nanostate");
location.reload();

Developer Integration

The system automatically detects elements using standard selectors:

.fbutton,
button,
input,
textarea,
select,
[contenteditable="true"],
div.words,
div[title],
div[alt],
div[aria-label],
#text

You can make any element compatible simply by using one of these attributes or classes.


Basic Example (Button)

This button will automatically be picked up by the Tutorial Layer:

<button class="fbutton" title="Save your changes">
  Save
</button>

What happens:


Example with aria-label + description

<button class="fbutton"
        aria-label="Delete item permanently"
        data-desc="This removes the item from the system">
  Delete
</button>

How it is interpreted:


Example with custom element (div button)

Open Settings
<div class="fbutton"
     title="Open settings panel"
     data-desc="This opens the configuration menu for the application">
  Open Settings
</div>

How the system interprets elements

Priority order for display text:

  1. title
  2. aria-label
  3. innerText (fallback)

Priority order for description:

  1. alt
  2. data-desc
  3. aria-description
  4. aria-label
  5. title

Key behavior notes


Summary

The Tutorial Layer requires no setup beyond using standard HTML attributes. Once active, it turns any UI into a self-explaining system by binding explanations directly to real DOM elements.