diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php
index 88487fb068d11..31d03cb81c610 100644
--- a/src/wp-includes/html-api/class-wp-html-tag-processor.php
+++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php
@@ -2208,7 +2208,8 @@ private function parse_next_tag(): bool {
* @since 6.2.0
* @ignore
*
- * @return bool Whether an attribute was found before the end of the document.
+ * @return bool Whether an attribute was found. Returns `false` upon reaching the end
+ * of the tag (`>` or `/>`) or the end of the document.
*/
private function parse_next_attribute(): bool {
$doc_length = strlen( $this->html );