Sightly replace tag with different value - AEM
<p>I am trying to manipulate the content read from RTE. RTE places a <code>&lt;br&gt;</code> tag for <kbd>Shift</kbd>+<kbd>Enter</kbd>. For <a href="https://www.w3.org/WAI/intro/aria" rel="nofollow">WAI</a> compliance, need to replace <code>&lt;br&gt;</code> with <code>&lt;br aria-hidden='true'&gt;</code>. </p>

<p>Tried following in JavaScript Use API, but following is not working, it keeps the tag as is</p>

<p><code>text.replaceAll("&lt;br&gt;","&lt;br aria-hidden='true'&gt;");</code></p>

<p>If I replace with some different tag it replaces the value properly</p>

<p><code>text.replaceAll("&lt;br&gt;","&lt;div&gt;Something&lt;/div&gt;");</code></p>

<p>Tried same thing in Java Use API also, but not working. Any pointers would help.</p>