It is possible to add barrier=fence to the area itself. But it is preferred to use a separate object for the barrier. A separate has the advantage, that you can map gaps or changes in the barrier type.
barrier=fence