For a function $u\in W^{1,p}_{loc}(\Omega)$, we say that $u\leq 0$ on $\partial\Omega$ if for every $k>0$, $(u-k)^+\in W_{0}^{1,p}(\Omega)$. And $u\geq 0$ on $\partial\Omega$ in the same way i.e, $-u\leq 0$.
In addition, we say that $u=0$ on $\partial\Omega$ if $u\leq 0$ and $u\geq 0$ on $\partial\Omega$, for example see Ambroseeti-Arcoya's book.
One thing I understand that we are shifting local function to trace zero function in some sense to define and the definition coincides if we choose any $W^{1,p}_{0}(\Omega)$ function.
But, I think the motivation to define the boundary condition like this is not clear to me. Can you please give a brief explanation.
Thank You very much in advance...
I think the obstacle here is that functions are taken from a local space. In particular they can tend to infinity as point goes to the boundary and its trace wouldn't exist. In the sense of this definition it's ОК for $u\le0$ to go to $-\infty$. But wouldn't do if it's bounded from below by a positive constant ($u\ge c>0$) in some neighbourhood of a boundary point.