# Live Region

If an area of a page is dynamically updated without a full-page reload, we *might* (see [FAQ: When Should A Live Region Be Used?](https://ebay.gitbook.io/mindpatterns/appendix/faq#when-should-a-live-region-be-used)) wish to inform the user that there was a change.

```markup
<div aria-live=”polite”>
    <p>Newcastle United 0 - Barcelona 0</p>
</div>
```

Whenever the inner text changes, or the CSS display of the content changes from none to block\[1], the screen reader will announce the contents.

```markup
<div aria-live=”polite”>
    <p>Goal!</p>
</div>
```

Screen reader announces “Goal!”

```markup
<div aria-live=”polite”>
    <p>Newcastle United 1 - Barcelona 0</p>
</div>
```

Screen reader announces “Newcastle United 1 - Barcelona 0".

Note, sometimes we may wish to announce the content that changed (as in this football score example), in other cases we may only wish to give an update as to the nature of the change (e.g. "Attention! Errors found"). A general rule of thumb is to keep the live-region short and free from structured data and interactive elements.

\[1] It is very important to note that any CSS display operation **must** happen on a descendant node of the live region, and not on the live region node itself.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ebay.gitbook.io/mindpatterns/techniques/live-region.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
