Documentation Bug - TWebProgressBar: ID needs to go in PROGRESS tag

In the documentation for the TWebProgressBar, the ID is put in an enclosing DIV, like so

<DIV ID=”MyProgressBarID”><PROGRESS></PROGRESS></DIV>

First thing is, that when looking into the Upload demo, instead of a DIV the system actually renders a SPAN. So in fact it should read:

<SPAN ID=”MyProgressBarID”><PROGRESS></PROGRESS></SPAN>

Now, when setting the position of the progress bar, while the progress bar is associated with an actual ElementID, like so

MyProgressBar.Position := 50;

this erratically adds the property value='50' into the enclosing SPAN rather than into the PROGRESS element, such that the progress bar doesn't move.

Instead, the ID has to be put in the PROGRESS tag, like so:

<SPAN><PROGRESS ID=”MyProgressBarID”></PROGRESS></SPAN>

When now doing a MyProgressBar.Position := 50; then the value='50' is correctly rendered into the PROGRESS element and the progress bar moves as expected.

Caution: When in fact using DIV instead of SPAN for the enclosing tag, aswritten in the documentation, it's even getting worse, because then the library code just overwrites the whole inner html and thus the PROGRESS tag altogether with the value to be set.

This is the problematic library code in the Core Source branch:

Unit WebLib.ComCtrls;
...
Procedure TProgressBar.DoUpdate;
...
 if isLinked then
  begin
    if ElementHandle.TagName= 'DIV' then
    begin
      if ElementHandle['role'] = 'progressbar' then
        ElementHandle.style.setProperty('width',inttostr(pos)+'%')
      else
        ElementHandle.innerHTML := inttostr(pos)      <<-- destroys PROGRESS tag if using DIV
    end
    else
      ElementHandle.setAttribute('value',inttostr(pos)); <<-- sets value in SPAN rather than in PROGRESS

    Exit;
  end;