A single accessible text node — the minimum a screen reader needs to describe a piece of painted text. More...
#include <text_accessibility.hpp>
Public Attributes | |
| std::string | id |
| Caller-stable identifier. Used as the registration key. | |
| std::string | text |
| UTF-8 content of the node. | |
| TextAccessibilityRole | role = TextAccessibilityRole::Label |
| Semantic role hint. | |
| std::vector< std::size_t > | cluster_boundaries_utf8 |
| Cluster boundaries in UTF-8 byte offsets. | |
| std::vector< std::size_t > | cluster_boundaries_utf16 |
| Cluster boundaries in UTF-16 code units. | |
| std::size_t | selection_start_utf8 = 0 |
| Active selection range in UTF-8 byte offsets. | |
| std::size_t | selection_end_utf8 = 0 |
A single accessible text node — the minimum a screen reader needs to describe a piece of painted text.
All offsets are byte offsets into text (UTF-8) or code-unit offsets when expressed in UTF-16.
| std::vector<std::size_t> pulp::view::TextAccessibilityNode::cluster_boundaries_utf16 |
Cluster boundaries in UTF-16 code units.
Mirrors the UTF-8 vector but expressed in the encoding most platform a11y APIs (NSAccessibility, UIA) expose.
| std::vector<std::size_t> pulp::view::TextAccessibilityNode::cluster_boundaries_utf8 |
Cluster boundaries in UTF-8 byte offsets.
Each entry is the starting byte index of a grapheme cluster; the vector should typically include 0 and text.size() as bookends.
| std::string pulp::view::TextAccessibilityNode::id |
Caller-stable identifier. Used as the registration key.
| TextAccessibilityRole pulp::view::TextAccessibilityNode::role = TextAccessibilityRole::Label |
Semantic role hint.
| std::size_t pulp::view::TextAccessibilityNode::selection_end_utf8 = 0 |
| std::size_t pulp::view::TextAccessibilityNode::selection_start_utf8 = 0 |
Active selection range in UTF-8 byte offsets.
Both fields == 0 means "no selection" (i.e. the node has no caret).
| std::string pulp::view::TextAccessibilityNode::text |
UTF-8 content of the node.